mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-09 21:50:48 +08:00
Merge pull request #1058 from nextcloud/Zoey2936-patch-1
add docker healthchecks to the docker images
This commit is contained in:
commit
f15a28b9e7
10 changed files with 35 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ RUN set -ex; \
|
||||||
openssl \
|
openssl \
|
||||||
netcat \
|
netcat \
|
||||||
dpkg-dev \
|
dpkg-dev \
|
||||||
|
curl \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
@ -72,4 +73,6 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||||
USER www-data
|
USER www-data
|
||||||
|
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD (curl -skfI localhost:8000 && curl -skfI localhost:$APACHE_PORT) || exit 1
|
||||||
|
|
@ -13,3 +13,5 @@ RUN set -ex; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
USER 104
|
USER 104
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -skfI localhost:9980 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
FROM alpine:3.16.2
|
FROM alpine:3.16.2
|
||||||
RUN apk add --update --no-cache lighttpd bash
|
RUN apk add --update --no-cache lighttpd bash curl
|
||||||
|
|
||||||
RUN adduser -S www-data -G www-data
|
RUN adduser -S www-data -G www-data
|
||||||
RUN rm -rf /etc/lighttpd/lighttpd.conf
|
RUN rm -rf /etc/lighttpd/lighttpd.conf
|
||||||
|
|
@ -14,3 +14,5 @@ RUN chmod +x /start.sh
|
||||||
USER www-data
|
USER www-data
|
||||||
RUN mkdir -p /var/www/domaincheck/
|
RUN mkdir -p /var/www/domaincheck/
|
||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -skfI localhost:$APACHE_PORT || exit 1
|
||||||
|
|
@ -1,2 +1,15 @@
|
||||||
# From https://github.com/h2non/imaginary/blob/master/Dockerfile
|
# From https://github.com/h2non/imaginary/blob/master/Dockerfile
|
||||||
FROM nextcloud/imaginary:20220822
|
FROM nextcloud/imaginary:20220822
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN set -ex; \
|
||||||
|
\
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
; \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
USER nobody
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -skI 127.0.0.1:9000 || exit 1
|
||||||
|
|
@ -101,3 +101,5 @@ USER root
|
||||||
|
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -skfI https://localhost:8080 || exit 1
|
||||||
|
|
@ -252,3 +252,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||||
|
|
||||||
USER www-data
|
USER www-data
|
||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD (nc -z localhost 9000 && curl -skI localhost:7867) || exit 1
|
||||||
|
|
@ -1,2 +1,4 @@
|
||||||
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
|
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
|
||||||
FROM onlyoffice/documentserver:7.1.1.23
|
FROM onlyoffice/documentserver:7.1.1.23
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -skfI localhost || exit 1
|
||||||
|
|
@ -31,3 +31,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||||
|
|
||||||
USER postgres
|
USER postgres
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
||||||
|
|
@ -11,3 +11,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||||
|
|
||||||
USER redis
|
USER redis
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1
|
||||||
|
|
@ -9,6 +9,7 @@ RUN set -ex; \
|
||||||
supervisor \
|
supervisor \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
netcat \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
@ -67,3 +68,5 @@ ENV TALK_PORT=3478
|
||||||
USER talk
|
USER talk
|
||||||
ENTRYPOINT ["start.sh"]
|
ENTRYPOINT ["start.sh"]
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
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
|
||||||
Loading…
Add table
Reference in a new issue