diff --git a/Containers/whiteboard/Dockerfile b/Containers/whiteboard/Dockerfile index c4446756..3d178c18 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 00000000..4f53988a --- /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 a3525940..cf302369 100644 --- a/php/containers.json +++ b/php/containers.json @@ -874,6 +874,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" ],