mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
fix(docker): add mysql container health check
This makes the prepare_backend container (which runs migrations) wait until the mysql server is actually running, not just the container. Thanks to Skyz on Discord for the implementation.
This commit is contained in:
parent
d472fd4fa6
commit
ec8523ce75
1 changed files with 7 additions and 1 deletions
|
@ -24,6 +24,11 @@ services:
|
|||
volumes:
|
||||
- ./docker/production/data/mysql:/var/lib/mysql
|
||||
command: --authentication-policy=mysql_native_password
|
||||
healthcheck:
|
||||
test: "/usr/bin/mysql --user=root --password=\"${DOCKER_PROD_MYSQL_ROOT_PASSWORD}\" --execute \"SHOW DATABASES;\""
|
||||
interval: 5s
|
||||
timeout: 300s
|
||||
retries: 60
|
||||
|
||||
prepare_backend:
|
||||
build:
|
||||
|
@ -32,7 +37,8 @@ services:
|
|||
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
|
||||
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
|
||||
depends_on:
|
||||
- mysql
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./:/zeppelin
|
||||
command: |-
|
||||
|
|
Loading…
Add table
Reference in a new issue