Skip to content

Commit 6f9351a

Browse files
Added the missing heathcheck for the container (ipfs#8429)
* Added heathcheck for the docker container
1 parent 0b923b7 commit 6f9351a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,10 @@ ENV IPFS_LOGGING ""
106106
# 2. The API and Gateway are accessible from outside the container.
107107
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/start_ipfs"]
108108

109+
# Heathcheck for the container
110+
# QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn is the CID of empty folder
111+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
112+
CMD ipfs dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1
113+
109114
# Execute the daemon subcommand by default
110115
CMD ["daemon", "--migrate=true"]

0 commit comments

Comments
 (0)