mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-11-18 14:55:24 +08:00
improve healthcheck to only exit 1 if it is started
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
4750fb228f
commit
fc29e69b96
3 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
nc -z "$NEXTCLOUD_HOST" 9000 || exit 0
|
||||
curl -skfI localhost:8000 || exit 1
|
||||
if [ "$APACHE_PORT" != '443' ]; then
|
||||
nc -z localhost "$APACHE_PORT" || exit 1
|
||||
|
|
|
|||
|
|
@ -250,4 +250,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
|||
USER root
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
||||
HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1
|
||||
HEALTHCHECK CMD (sudo -u www-data nc -z "$POSTGRES_HOST" 5432 || exit 0) && (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1
|
||||
|
|
@ -32,4 +32,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
|||
USER postgres
|
||||
ENTRYPOINT ["start.sh"]
|
||||
|
||||
HEALTHCHECK CMD psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
||||
HEALTHCHECK CMD (test -f "/mnt/data/backup-is-running" && exit 0) && psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1
|
||||
Loading…
Add table
Reference in a new issue