From 27a3c410330e14f6cb4f256ae860e815dd69fc58 Mon Sep 17 00:00:00 2001 From: egguy Date: Tue, 14 Dec 2021 10:33:31 +0100 Subject: [PATCH 1/2] Add a health check to the Dockerfile Allow to detect if there's problem with the nginx process and restart it. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index f12f3a1..150153e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,3 +44,5 @@ VOLUME ["/data/logs", "/data/cache", "/data/cachedomains", "/var/www"] EXPOSE 80 443 WORKDIR /scripts + +HEALTHCHECK CMD curl --fail http://127.0.0.1/lancache-heartbeat || exit 1 From 40bb1d87064a58288fecdc600e6e374883ac6960 Mon Sep 17 00:00:00 2001 From: Etienne G Date: Tue, 8 Mar 2022 11:15:47 +0100 Subject: [PATCH 2/2] Updated with new settings. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 150153e..ec6709e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,4 +45,4 @@ VOLUME ["/data/logs", "/data/cache", "/data/cachedomains", "/var/www"] EXPOSE 80 443 WORKDIR /scripts -HEALTHCHECK CMD curl --fail http://127.0.0.1/lancache-heartbeat || exit 1 +HEALTHCHECK --interval=1m --timeout=1s --start-period=120s --retries=3 CMD curl --fail http://127.0.0.1/lancache-heartbeat || exit 1