Skip to content

Commit 4c7d0df

Browse files
committed
fix startup order
1 parent 22e582e commit 4c7d0df

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tools/docker-dev/docker-compose.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ services:
99
- "8010:80"
1010
- "389:389"
1111
healthcheck:
12-
test: ["CMD", "nc", "-z", "localhost", "389"]
12+
test: ["CMD-SHELL", "if [ -f /tmp/up ]; then (nc -z localhost 389 && touch /tmp/up); else true; fi"]
13+
interval: 1s
1314
sql:
1415
hostname: sql
1516
build: sql
1617
ports:
1718
- "8020:80"
1819
- "3306:3306"
1920
healthcheck:
20-
test: ["CMD", "nc", "-z", "localhost", "3306"]
21+
test: ["CMD-SHELL", "if [ -f /tmp/up ]; then (nc -z localhost 3306 && touch /tmp/up); else true; fi"]
22+
interval: 1s
2123
smtp:
2224
hostname: smtp
2325
image: schickling/mailcatcher
@@ -29,7 +31,8 @@ services:
2931
ports:
3032
- "6379:6379"
3133
healthcheck:
32-
test: ["CMD", "nc", "-z", "localhost", "6379"]
34+
test: ["CMD-SHELL", "if [ -f /tmp/up ]; then (nc -z localhost 6379 && touch /tmp/up); else true; fi"]
35+
interval: 1s
3336
web:
3437
hostname: web
3538
build: web
@@ -38,7 +41,11 @@ services:
3841
volumes:
3942
- ../../:/var/www/unity-web-portal
4043
depends_on:
41-
- identity
42-
- sql
43-
- smtp
44-
- redis
44+
identity:
45+
condition: service_healthy
46+
sql:
47+
condition: service_healthy
48+
smtp:
49+
condition: service_started
50+
redis:
51+
condition: service_healthy

0 commit comments

Comments
 (0)