@@ -17,7 +17,7 @@ services:
17
17
networks :
18
18
- user-db-network
19
19
healthcheck :
20
- test : [" CMD-SHELL", " pg_isready -U peerprep-user-express -d user" ]
20
+ test : [' CMD-SHELL', ' pg_isready -U peerprep-user-express -d user' ]
21
21
interval : 10s
22
22
retries : 5
23
23
start_period : 30s
@@ -37,7 +37,7 @@ services:
37
37
networks :
38
38
- collab-db-network
39
39
healthcheck :
40
- test : [" CMD-SHELL", " pg_isready -U peerprep-collab-express -d collab" ]
40
+ test : [' CMD-SHELL', ' pg_isready -U peerprep-collab-express -d collab' ]
41
41
interval : 10s
42
42
retries : 5
43
43
start_period : 30s
@@ -57,7 +57,7 @@ services:
57
57
networks :
58
58
- question-db-network
59
59
healthcheck :
60
- test : [" CMD-SHELL", " pg_isready -U peerprep-qn-express -d question" ]
60
+ test : [' CMD-SHELL', ' pg_isready -U peerprep-qn-express -d question' ]
61
61
interval : 10s
62
62
retries : 5
63
63
start_period : 30s
@@ -72,7 +72,7 @@ services:
72
72
context : ./backend/user
73
73
dockerfile : express.Dockerfile
74
74
target : production
75
- args :
75
+ args :
76
76
# For building with the correct env vars
77
77
- env=${USER_EXPRESS_ENV}
78
78
- port=${USER_EXPRESS_PORT}
@@ -91,7 +91,12 @@ services:
91
91
networks :
92
92
- user-db-network
93
93
- user-api-network
94
- entrypoint : ['/bin/sh', 'entrypoint.sh']
94
+ healthcheck :
95
+ test : wget --no-verbose --tries=1 --spider http://localhost:9001/health || exit 1
96
+ interval : 30s
97
+ timeout : 10s
98
+ retries : 5
99
+ start_period : 5s
95
100
96
101
# Frontend
97
102
@@ -112,18 +117,14 @@ services:
112
117
- VITE_USER_SERVICE=http://${USER_SERVICE_NAME}:${USER_EXPRESS_PORT}
113
118
- VITE_QUESTION_SERVICE=http://localhost:${QUESTION_EXPRESS_PORT}
114
119
- port=${FRONTEND_PORT}
115
- # depends_on:
116
- # - user-service
120
+ depends_on :
121
+ user-service :
122
+ condition : service_healthy
123
+ restart : true
117
124
networks :
118
125
- user-api-network
119
126
- question-api-network
120
127
- collab-api-network
121
- healthcheck :
122
- test : wget --no-verbose --tries=1 --spider http://localhost:9001/health || exit 1
123
- interval : 30s
124
- timeout : 10s
125
- retries : 5
126
- start_period : 5s
127
128
128
129
volumes :
129
130
# Persistent Volumes for Databases
0 commit comments