diff --git a/Dockerfile b/Dockerfile index 9322e891b..a0d6a50d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -106,5 +106,10 @@ ENV IPFS_LOGGING "" # 2. The API and Gateway are accessible from outside the container. ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/start_ipfs"] +# Heathcheck for the container +# QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn is the CID of empty folder +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD ipfs dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1 + # Execute the daemon subcommand by default CMD ["daemon", "--migrate=true"]