Spaces:
Sleeping
Sleeping
Update docker-compose.yml
Browse files- docker-compose.yml +8 -2
docker-compose.yml
CHANGED
@@ -13,6 +13,11 @@ services:
|
|
13 |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
14 |
ports:
|
15 |
- "5432:5432"
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
web:
|
18 |
build: .
|
@@ -20,11 +25,12 @@ services:
|
|
20 |
ports:
|
21 |
- "7860:7860"
|
22 |
depends_on:
|
23 |
-
|
|
|
24 |
environment:
|
25 |
- NODE_ENV=development
|
26 |
links:
|
27 |
- db
|
28 |
|
29 |
volumes:
|
30 |
-
postgres_data:
|
|
|
13 |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
14 |
ports:
|
15 |
- "5432:5432"
|
16 |
+
healthcheck:
|
17 |
+
test: ["CMD-SHELL", "pg_isready -U user"]
|
18 |
+
interval: 10s
|
19 |
+
timeout: 5s
|
20 |
+
retries: 5
|
21 |
|
22 |
web:
|
23 |
build: .
|
|
|
25 |
ports:
|
26 |
- "7860:7860"
|
27 |
depends_on:
|
28 |
+
db:
|
29 |
+
condition: service_healthy
|
30 |
environment:
|
31 |
- NODE_ENV=development
|
32 |
links:
|
33 |
- db
|
34 |
|
35 |
volumes:
|
36 |
+
postgres_data:
|