From c2a25b2e01bb8bc1257de760ef019adae206cbc3 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 3 Dec 2024 11:43:29 +0100 Subject: [PATCH] add healtcheck for oo Signed-off-by: Simon L. --- Containers/onlyoffice/Dockerfile | 4 +++- Containers/onlyoffice/healthcheck.sh | 3 +++ php/containers.json | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Containers/onlyoffice/healthcheck.sh diff --git a/Containers/onlyoffice/Dockerfile b/Containers/onlyoffice/Dockerfile index 412ce05458e..bfecd246362 100644 --- a/Containers/onlyoffice/Dockerfile +++ b/Containers/onlyoffice/Dockerfile @@ -4,5 +4,7 @@ FROM onlyoffice/documentserver:8.2.2.1 # USER root is probably used -HEALTHCHECK CMD nc -z 127.0.0.1 80 || exit 1 +COPY --chmod=775 healthcheck.sh /healthcheck.sh + +HEALTHCHECK --start-period=360s CMD /healthcheck.sh LABEL com.centurylinklabs.watchtower.enable="false" diff --git a/Containers/onlyoffice/healthcheck.sh b/Containers/onlyoffice/healthcheck.sh new file mode 100644 index 00000000000..7a9d79d0aad --- /dev/null +++ b/Containers/onlyoffice/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +nc -z 127.0.0.1 80 || exit 1 diff --git a/php/containers.json b/php/containers.json index 265010eda57..6b4ee23edd3 100644 --- a/php/containers.json +++ b/php/containers.json @@ -654,6 +654,14 @@ "display_name": "OnlyOffice", "image": "nextcloud/aio-onlyoffice", "init": true, + "healthcheck": { + "start_period": "360s", + "test": "/healthcheck.sh", + "interval": "30s", + "timeout": "30s", + "start_interval": "5s", + "retries": 3 + }, "expose": [ "80" ],