From c4c0068664c232880dfd8a56426bc7ad218511f2 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 3 Dec 2024 11:30:23 +0100 Subject: [PATCH] add healthcheck for collabora Signed-off-by: Simon L. --- Containers/collabora/Dockerfile | 4 +++- Containers/collabora/healthcheck.sh | 3 +++ php/containers.json | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Containers/collabora/healthcheck.sh diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile index 40f2c4f69cab..3c709c35bd11 100644 --- a/Containers/collabora/Dockerfile +++ b/Containers/collabora/Dockerfile @@ -15,7 +15,9 @@ RUN set -ex; \ ; \ rm -rf /var/lib/apt/lists/*; +COPY --chmod=775 healthcheck.sh /healthcheck.sh + USER 100 -HEALTHCHECK CMD nc -z 127.0.0.1 9980 || exit 1 +HEALTHCHECK --start-period=360s CMD /healthcheck.sh LABEL com.centurylinklabs.watchtower.enable="false" diff --git a/Containers/collabora/healthcheck.sh b/Containers/collabora/healthcheck.sh new file mode 100644 index 000000000000..67cecdc3bda8 --- /dev/null +++ b/Containers/collabora/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +nc -z 127.0.0.1 9980 || exit 1 diff --git a/php/containers.json b/php/containers.json index 142f27724782..cf435422ef7a 100644 --- a/php/containers.json +++ b/php/containers.json @@ -341,6 +341,14 @@ "display_name": "Collabora", "image": "nextcloud/aio-collabora", "init": true, + "healthcheck": { + "start_period": "360s", + "test": "healthcheck.sh", + "interval": "30s", + "timeout": "30s", + "start_interval": "5s", + "retries": 3 + }, "expose": [ "9980" ],