add healthcheck for database
This commit is contained in:
parent
226ed3c2a2
commit
af21f1cdc2
1 changed files with 8 additions and 1 deletions
|
@ -16,6 +16,12 @@ services:
|
|||
MYSQL_DATABASE: dotclear_db
|
||||
MYSQL_USER: dotclear_user
|
||||
MYSQL_PASSWORD: dotclear_pwd
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
start_period: 10s
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
dc_app:
|
||||
image: jcpd/docker-dotclear:latest
|
||||
|
@ -26,7 +32,8 @@ services:
|
|||
ports:
|
||||
- 80:80
|
||||
depends_on:
|
||||
- dc_db
|
||||
dc_db: # MYSQL database service
|
||||
condition: service_healthy # Waiting for database ready
|
||||
environment:
|
||||
DC_DBDRIVER: mysqlimb4
|
||||
DC_DBHOST: dc_db
|
||||
|
|
Loading…
Reference in a new issue