From f333f740e30f6411a16a36b7d8172bb213cd2eae Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 3 Dec 2024 11:36:32 +0100 Subject: [PATCH] add healthcheck for fts Signed-off-by: Simon L. --- Containers/fulltextsearch/Dockerfile | 4 +++- Containers/fulltextsearch/healthcheck.sh | 3 +++ php/containers.json | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Containers/fulltextsearch/healthcheck.sh diff --git a/Containers/fulltextsearch/Dockerfile b/Containers/fulltextsearch/Dockerfile index 571780ed..9b7804f7 100644 --- a/Containers/fulltextsearch/Dockerfile +++ b/Containers/fulltextsearch/Dockerfile @@ -16,7 +16,9 @@ RUN set -ex; \ ; \ rm -rf /var/lib/apt/lists/*; +COPY --chmod=775 healthcheck.sh /healthcheck.sh + USER 1000:0 -HEALTHCHECK CMD nc -z 127.0.0.1 9200 || exit 1 +HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD /healthcheck.sh LABEL com.centurylinklabs.watchtower.enable="false" diff --git a/Containers/fulltextsearch/healthcheck.sh b/Containers/fulltextsearch/healthcheck.sh new file mode 100644 index 00000000..5e888ea6 --- /dev/null +++ b/Containers/fulltextsearch/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +nc -z 127.0.0.1 9200 || exit 1 diff --git a/php/containers.json b/php/containers.json index cdf9d73c..d99a1881 100644 --- a/php/containers.json +++ b/php/containers.json @@ -732,6 +732,14 @@ "display_name": "Fulltextsearch", "image": "nextcloud/aio-fulltextsearch", "init": false, + "healthcheck": { + "start_period": "60s", + "test": "/healthcheck.sh", + "interval": "10s", + "timeout": "5s", + "start_interval": "5s", + "retries": 5 + }, "expose": [ "9200" ],