From 4e4eadde276581ede0bfd12eeb35955d87a84756 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 3 Dec 2024 11:56:35 +0100 Subject: [PATCH] add healthcheck for whiteboard Signed-off-by: Simon L. --- Containers/whiteboard/Dockerfile | 4 ++++ Containers/whiteboard/healthcheck.sh | 4 ++++ php/containers.json | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 Containers/whiteboard/healthcheck.sh diff --git a/Containers/whiteboard/Dockerfile b/Containers/whiteboard/Dockerfile index c4446756fc81..3d178c18fdbe 100644 --- a/Containers/whiteboard/Dockerfile +++ b/Containers/whiteboard/Dockerfile @@ -1,4 +1,5 @@ # syntax=docker/dockerfile:latest +# Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile FROM ghcr.io/nextcloud-releases/whiteboard:v1.0.4 USER root @@ -8,6 +9,9 @@ RUN set -ex; \ USER 65534 COPY --chmod=775 start.sh /start.sh +COPY --chmod=775 healthcheck.sh /healthcheck.sh + +HEALTHCHECK CMD /healthcheck.sh ENTRYPOINT ["/start.sh"] diff --git a/Containers/whiteboard/healthcheck.sh b/Containers/whiteboard/healthcheck.sh new file mode 100644 index 000000000000..4f53988a6313 --- /dev/null +++ b/Containers/whiteboard/healthcheck.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +nc -z "$REDIS_HOST" 6379 || exit 0 +nc -z 127.0.0.1 3002 || exit 1 diff --git a/php/containers.json b/php/containers.json index 18960c6b1352..2f9f3451393f 100644 --- a/php/containers.json +++ b/php/containers.json @@ -866,6 +866,14 @@ "image": "nextcloud/aio-whiteboard", "user": "65534", "init": true, + "healthcheck": { + "start_period": "0s", + "test": "/healthcheck.sh", + "interval": "30s", + "timeout": "30s", + "start_interval": "5s", + "retries": 3 + }, "expose": [ "3002" ],