-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-prod.yml
269 lines (250 loc) · 5.81 KB
/
docker-compose-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
services:
user-service:
image: peerprep/user-service
build:
context: ./backend/user-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/user-service/.env
ports:
- 3001:3001
depends_on:
- user-service-mongo
- user-service-redis
networks:
- peerprep-network
restart: on-failure
question-service:
image: peerprep/question-service
build:
context: ./backend/question-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/question-service/.env
ports:
- 3000:3000
depends_on:
- question-service-mongo
- user-service
networks:
- peerprep-network
restart: on-failure
matching-service:
image: peerprep/matching-service
build:
context: ./backend/matching-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/matching-service/.env
ports:
- 3002:3002
depends_on:
rabbitmq:
condition: service_healthy
user-service:
condition: service_started
networks:
- peerprep-network
restart: on-failure
collab-service:
image: peerprep/collab-service
build:
context: ./backend/collab-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/collab-service/.env
ports:
- 3003:3003
depends_on:
- collab-service-redis
networks:
- peerprep-network
restart: on-failure
code-execution-service:
image: peerprep/code-execution-service
build:
context: ./backend/code-execution-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/code-execution-service/.env
ports:
- 3004:3004
networks:
- peerprep-network
restart: on-failure
communication-service:
image: peerprep/communication-service
build:
context: ./backend/communication-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/communication-service/.env
ports:
- 3005:3005
depends_on:
- user-service
networks:
- peerprep-network
restart: on-failure
qn-history-service:
image: peerprep/qn-history-service
build:
context: ./backend/qn-history-service
dockerfile: Dockerfile
target: prod
env_file: ./backend/qn-history-service/.env
ports:
- 3006:3006
depends_on:
- qn-history-service-mongo
- user-service
- question-service
networks:
- peerprep-network
restart: on-failure
frontend:
image: peerprep/frontend
build:
context: ./frontend
dockerfile: Dockerfile
target: prod
ports:
- 5173:4173
depends_on:
- user-service
- question-service
- matching-service
- collab-service
- code-execution-service
- communication-service
- qn-history-service
networks:
- peerprep-network
restart: on-failure
question-service-mongo:
image: mongo
restart: always
ports:
- 27017:27017
networks:
- peerprep-network
volumes:
- question-service-mongo-data:/data/db
env_file:
- ./backend/question-service/.env
question-service-mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
networks:
- peerprep-network
depends_on:
- question-service-mongo
env_file: ./backend/question-service/.env
user-service-mongo:
image: mongo
restart: always
ports:
- 27018:27017
networks:
- peerprep-network
volumes:
- user-service-mongo-data:/data/db
env_file:
- ./backend/user-service/.env
user-service-mongo-express:
image: mongo-express
restart: always
ports:
- 8082:8081
networks:
- peerprep-network
depends_on:
- user-service-mongo
env_file: ./backend/user-service/.env
qn-history-service-mongo:
image: mongo
restart: always
ports:
- 27019:27017
networks:
- peerprep-network
volumes:
- qn-history-service-mongo-data:/data/db
env_file:
- ./backend/qn-history-service/.env
qn-history-service-mongo-express:
image: mongo-express
restart: always
ports:
- 8083:8081
networks:
- peerprep-network
depends_on:
- qn-history-service-mongo
env_file: ./backend/qn-history-service/.env
rabbitmq:
image: rabbitmq:4.0-management
container_name: rabbitmq
restart: always
ports:
- 5672:5672
- 15672:15672
networks:
- peerprep-network
env_file: ./backend/matching-service/.env
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 20s
timeout: 10s
retries: 10
user-service-redis:
image: redis:8.0-M01
container_name: user-service-redis
ports:
- 6379:6379
networks:
- peerprep-network
volumes:
- user-service-redis-data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
timeout: 10s
retries: 10
command: ["redis-server"]
collab-service-redis:
image: redis:8.0-M01
container_name: collab-service-redis
ports:
- 6380:6379
networks:
- peerprep-network
volumes:
- collab-service-redis-data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
timeout: 10s
retries: 10
command: ["redis-server"]
redis-insight:
image: redis/redisinsight:latest
container_name: redis-insight
ports:
- 5540:5540
networks:
- peerprep-network
volumes:
- redis-insight-data:/data
volumes:
question-service-mongo-data:
user-service-mongo-data:
qn-history-service-mongo-data:
user-service-redis-data:
collab-service-redis-data:
redis-insight-data:
networks:
peerprep-network:
driver: bridge