Skip to content

Commit

Permalink
add healthcheck for whiteboard
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L. <[email protected]>
  • Loading branch information
szaimen committed Dec 3, 2024
1 parent 9360256 commit c908def
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Containers/whiteboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]

Expand Down
4 changes: 4 additions & 0 deletions Containers/whiteboard/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

nc -z "$REDIS_HOST" 6379 || exit 0
nc -z 127.0.0.1 3002 || exit 1
8 changes: 8 additions & 0 deletions php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down

0 comments on commit c908def

Please sign in to comment.