Added a view healthchecks

This commit is contained in:
Florian Zirker 2023-06-09 08:58:54 +02:00
parent 063ff194e2
commit 0520815da1
8 changed files with 75 additions and 16 deletions

View file

@ -11,6 +11,10 @@ services:
networks:
- web
- nextcloud
healthcheck:
test: curl -sSf 'http://localhost/status.php' | grep '"installed":true' | grep '"maintenance":false' | grep '"needsDbUpgrade":false' || exit 1
interval: 5s
timeout: 3s
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)"
@ -123,6 +127,7 @@ services:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MARIADB_AUTO_UPGRADE=1
logging:
driver: "json-file"
options:
@ -131,6 +136,10 @@ services:
networks:
- nextcloud
- mariadb
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 20s
timeout: 3s
labels:
- "docker.group=netxtcloud"
@ -166,6 +175,10 @@ services:
- monitoring
volumes:
- ${VOLUMES_PATH}/nextcloud/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
labels:
- "docker.group=netxtcloud"