From 7c6b2402ecbdb3eec32cf50f256a2079c88789b3 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Sat, 11 Sep 2021 21:44:47 +0530 Subject: [PATCH 1/2] Added the missing heathcheck for the container --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9322e891b3d..ae7330eed88 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 get /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1 + # Execute the daemon subcommand by default CMD ["daemon", "--migrate=true"] From 8543fc5b4d427cb69a4bfa9edd6b30368c778ae6 Mon Sep 17 00:00:00 2001 From: arjunraghurama Date: Fri, 1 Oct 2021 21:35:42 +0530 Subject: [PATCH 2/2] Replaced 'ipfs get' with 'ipfs dag stat' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ae7330eed88..a0d6a50d48a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,7 +109,7 @@ 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 get /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1 + CMD ipfs dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1 # Execute the daemon subcommand by default CMD ["daemon", "--migrate=true"]