mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-27 07:58:44 +08:00
use netcat for healthchecks
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
ac06db59c7
commit
95311fd7c3
6 changed files with 10 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
curl -skfI localhost:8000 || exit 1
|
||||
if [ "$APACHE_PORT" != '443' ]; then
|
||||
curl -skfI localhost:"$APACHE_PORT" || exit 1
|
||||
nc -z localhost "$APACHE_PORT" || exit 1
|
||||
else
|
||||
curl -skfI https://"$NC_DOMAIN":"$APACHE_PORT" || exit 1
|
||||
nc -z "$NC_DOMAIN" "$APACHE_PORT" || exit 1
|
||||
fi
|
||||
|
|
|
@ -9,9 +9,10 @@ RUN set -ex; \
|
|||
export DEBIAN_FRONTEND=noninteractive; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
tzdata \
|
||||
netcat \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER 104
|
||||
|
||||
HEALTHCHECK CMD curl -skfI localhost:9980 || exit 1
|
||||
HEALTHCHECK CMD nc -z localhost 9980 || exit 1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FROM alpine:3.16.2
|
||||
RUN apk add --update --no-cache lighttpd bash curl
|
||||
RUN apk add --update --no-cache lighttpd bash curl netcat-openbsd
|
||||
|
||||
RUN adduser -S www-data -G www-data
|
||||
RUN rm -rf /etc/lighttpd/lighttpd.conf
|
||||
|
@ -15,4 +15,4 @@ USER www-data
|
|||
RUN mkdir -p /var/www/domaincheck/
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD curl -skfI localhost:$APACHE_PORT || exit 1
|
||||
HEALTHCHECK CMD nc -z localhost $APACHE_PORT || exit 1
|
|
@ -8,8 +8,9 @@ RUN set -ex; \
|
|||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
netcat \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
USER nobody
|
||||
|
||||
HEALTHCHECK CMD curl -skI 127.0.0.1:9000 || exit 1
|
||||
HEALTHCHECK CMD nc -z localhost 9000 || exit 1
|
|
@ -252,4 +252,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
|||
USER www-data
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD (nc -z localhost 9000 && curl -skI localhost:7867) || exit 1
|
||||
HEALTHCHECK CMD (nc -z localhost 9000 && nc -z localhost 7867) || exit 1
|
|
@ -69,4 +69,4 @@ USER talk
|
|||
ENTRYPOINT ["start.sh"]
|
||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||
|
||||
HEALTHCHECK CMD (curl -skI localhost:8081 && curl -skI localhost:8188 && curl -skf --http0.9 localhost:4222 && nc -z localhost $TALK_PORT) || exit 1
|
||||
HEALTHCHECK CMD (nc -z localhost 8081 && nc -z localhost 8188 && nc -z localhost 4222 && nc -z localhost $TALK_PORT) || exit 1
|
Loading…
Reference in a new issue