Skip to content

Commit

Permalink
add healthcheck for imaginary
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 f333f74 commit b51223f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Containers/imaginary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:latest
FROM golang:1.23.3-alpine3.20 AS go

ENV IMAGINARY_HASH=8f36a26c448be8c151a3878404b75fcd1cd3cf0c
ENV IMAGINARY_HASH=8f36a26c448be8c151a3878404b75fcd1cd3cf0c

RUN set -ex; \
apk add --no-cache \
Expand Down Expand Up @@ -30,6 +30,7 @@ RUN set -ex; \

COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh

ENV PORT=9000

Expand All @@ -39,5 +40,5 @@ USER 65534
ENV MALLOC_ARENA_MAX=2
ENTRYPOINT ["/start.sh"]

HEALTHCHECK CMD nc -z 127.0.0.1 "$PORT" || exit 1
HEALTHCHECK CMD /healthcheck.sh
LABEL com.centurylinklabs.watchtower.enable="false"
3 changes: 3 additions & 0 deletions Containers/imaginary/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

nc -z 127.0.0.1 "$PORT" || exit 1
8 changes: 8 additions & 0 deletions php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,14 @@
"image": "nextcloud/aio-imaginary",
"user": "65534",
"init": true,
"healthcheck": {
"start_period": "0s",
"test": "/healthcheck.sh",
"interval": "30s",
"timeout": "30s",
"start_interval": "5s",
"retries": 3
},
"expose": [
"9000"
],
Expand Down

0 comments on commit b51223f

Please sign in to comment.