Skip to content

Commit 377d064

Browse files
committed
Correct healthcheck for mysql.
1 parent 8f71b69 commit 377d064

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sql/docker-compose.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@ services:
55
ports:
66
- "8888:8888"
77
volumes:
8-
- ..:/home/jovyan/bdge
8+
- ..:/home/jovyan/work/bdge
99
user: root
1010
environment:
1111
- GRANT_SUDO=yes
1212
depends_on:
13-
- mysql
13+
mysql:
14+
condition: service_healthy
1415

1516
mysql:
1617
image: mysql:8
1718
ports:
1819
- 3306
1920
environment:
2021
- MYSQL_ROOT_PASSWORD=root
21-
22+
healthcheck:
23+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p$$MYSQL_ROOT_PASSWORD"]
24+
interval: 10s
25+
start_period: 10s
26+
start_interval: 10s
27+
timeout: 5s
28+
retries: 10

0 commit comments

Comments
 (0)