mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 06:51:04 +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'
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql
|
- 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
|
# Core services
|
||||||
front:
|
front:
|
||||||
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.8}
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.8}
|
||||||
@ -39,6 +43,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "/etc/mailu/overrides/nginx:/overrides"
|
- "/etc/mailu/overrides/nginx:/overrides"
|
||||||
- "/etc/mailu/certs:/certs"
|
- "/etc/mailu/certs:/certs"
|
||||||
|
depends_on:
|
||||||
|
database:
|
||||||
|
condition: service_healthy
|
||||||
admin:
|
admin:
|
||||||
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8}
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8}
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user