mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
add healthcheck for imaginary
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
f333f740e3
commit
b51223fd69
3 changed files with 14 additions and 2 deletions
|
|
@ -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 \
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
Containers/imaginary/healthcheck.sh
Normal file
3
Containers/imaginary/healthcheck.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
nc -z 127.0.0.1 "$PORT" || exit 1
|
||||
|
|
@ -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"
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue