From 6f9351a3cab48b359194a7b298b73188ffecc2a3 Mon Sep 17 00:00:00 2001 From: arjunraghurama Date: Fri, 8 Oct 2021 20:57:49 +0530 Subject: [PATCH] Added the missing heathcheck for the container (#8429) * Added heathcheck for the docker container --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) 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"]