Added the missing heathcheck for the container (#8429)

* Added heathcheck for the docker container
This commit is contained in:
arjunraghurama 2021-10-08 20:57:49 +05:30 committed by GitHub
parent 0b923b7951
commit 6f9351a3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"]