docker: add more healthchecks (#731)

Reviewed-on: #731
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-02-02 13:52:33 +01:00 committed by mg
parent 65fb6fcc37
commit 71db37edef
3 changed files with 33 additions and 0 deletions

View file

@ -18,6 +18,16 @@ services:
MYSQL_INITDB_SKIP_TZINFO: 1
networks:
- intern
healthcheck:
interval: 30s
retries: 3
test:
[
"CMD",
"healthcheck.sh",
"--connect",
]
timeout: 30s
labels:
com.centurylinklabs.watchtower.enable: true
@ -39,6 +49,11 @@ services:
command: "redis-server --requirepass {{ lookup('keepass', 'nextcloud_redis_host_password', 'password') }}"
labels:
com.centurylinklabs.watchtower.enable: true
healthcheck:
test: ["CMD", "redis-cli", "--pass", "{{ lookup('keepass', 'nextcloud_redis_host_password', 'password') }}", "--no-auth-warning", "ping"]
interval: 5s
timeout: 2s
retries: 3
######## cron ########
nextcloud-cron:
@ -91,6 +106,11 @@ services:
- intern
- traefik
- mail-relay
healthcheck:
test: ["CMD", "curl", "-f", "--insecure", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
labels:
com.centurylinklabs.watchtower.enable: true
com.centurylinklabs.watchtower.depends-on: nextcloud-redis,nextcloud-db

View file

@ -21,6 +21,11 @@ services:
TZ: Europe/Berlin
labels:
com.centurylinklabs.watchtower.enable: true
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 30s
timeout: 10s
retries: 3
######## nforwardauth ########
nforwardauth:
@ -47,6 +52,12 @@ services:
- "./passwd:/passwd:ro" # Mount local passwd file at /passwd as read only
networks:
- traefik
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
######## Networks ########
networks:

View file

@ -37,6 +37,8 @@ api:
insecure: true
dashboard: true # unter Port 8081 erreichbar
ping: {} # für healthcheck
#experimental:
# plugins:
# ldapAuth: