mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +01:00
Added health check for database
This commit is contained in:
parent
32fdbdf84e
commit
4781e699e5
@ -19,7 +19,11 @@ services:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
|
||||
healthcheck:
|
||||
test: "/usr/bin/mysql --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\""
|
||||
interval: 3s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
# Core services
|
||||
front:
|
||||
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.8}
|
||||
@ -39,6 +43,9 @@ services:
|
||||
volumes:
|
||||
- "/etc/mailu/overrides/nginx:/overrides"
|
||||
- "/etc/mailu/certs:/certs"
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
admin:
|
||||
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8}
|
||||
restart: always
|
||||
|
Loading…
Reference in New Issue
Block a user