generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.staging.yml
199 lines (198 loc) · 4.6 KB
/
docker-compose.staging.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
version: "3"
services:
user:
container_name: user-service
build:
context: ./backend/user-service
dockerfile: Dockerfile.staging
ports:
- "5001:5000"
environment:
- PORT=5000
- NODE_ENV=production
env_file:
- ./backend/user-service/.env
depends_on:
postgres_user_service:
condition: service_healthy
networks:
- user-service-network
- api-network
postgres_user_service:
image: "postgres:latest"
container_name: postgres-user-service
volumes:
- "progresDB:/data/postgres/user-service"
env_file:
- ./backend/user-service/.env
networks:
- user-service-network
healthcheck:
test:
- CMD-SHELL
- sh -c 'pg_isready -U admin -d postgres'
interval: 10s
timeout: 3s
retries: 3
matching:
container_name: matching-service
build:
context: ./backend/matching-service
dockerfile: Dockerfile.staging
ports:
- "5002:5000"
environment:
- PORT=5000
- NODE_ENV=production
env_file:
- ./backend/matching-service/.env
depends_on:
postgres_matching_service:
condition: service_healthy
networks:
- matching-service-network
- api-network
postgres_matching_service:
image: "postgres:latest"
container_name: postgres-matching-service
volumes:
- "progresDB:/data/postgres/matching-service"
env_file:
- ./backend/matching-service/.env
networks:
- matching-service-network
healthcheck:
test:
- CMD-SHELL
- sh -c 'pg_isready -U admin -d postgres'
interval: 10s
timeout: 3s
retries: 3
question:
container_name: question-service
build:
context: ./backend/question-service
dockerfile: Dockerfile.staging
ports:
- "5003:5000"
environment:
- PORT=5000
- NODE_ENV=production
env_file:
- ./backend/question-service/.env
depends_on:
postgres_question_service:
condition: service_healthy
networks:
- question-service-network
- api-network
postgres_question_service:
image: "postgres:latest"
container_name: postgres-question-service
volumes:
- "progresDB:/data/postgres/question-service"
env_file:
- ./backend/question-service/.env
networks:
- question-service-network
healthcheck:
test:
- CMD-SHELL
- sh -c 'pg_isready -U admin -d postgres'
interval: 10s
timeout: 3s
retries: 3
history:
container_name: history-service
build:
context: ./backend/history-service
dockerfile: Dockerfile.staging
ports:
- "5007:5000"
environment:
- PORT=5000
- NODE_ENV=production
env_file:
- ./backend/history-service/.env
depends_on:
postgres_history_service:
condition: service_healthy
networks:
- history-service-network
- api-network
postgres_history_service:
image: "postgres:latest"
container_name: postgres-history-service
volumes:
- "progresDB:/data/postgres/history-service"
env_file:
- ./backend/history-service/.env
networks:
- history-service-network
healthcheck:
test:
- CMD-SHELL
- sh -c 'pg_isready'
interval: 15s
timeout: 15s
start_period: 90s
retries: 3
collaboration:
container_name: collaboration-service
build:
context: ./backend/collaboration-service
dockerfile: Dockerfile.staging
ports:
- "5004:5000"
environment:
- PORT=5000
- NODE_ENV=production
env_file:
- ./backend/collaboration-service/.env
networks:
- collaboration-service-network
- api-network
chat:
container_name: chat-service
build:
context: ./backend/chat-service
dockerfile: Dockerfile.dev
ports:
- "9000:9000"
environment:
- PORT=9000
env_file:
- ./backend/chat-service/.env
networks:
- chat-service-network
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile.staging
ports:
- "8080:8080"
environment:
- PORT=8080
env_file:
- ./frontend/.env
networks:
- chat-service-network
- api-network
networks:
chat-service-network:
driver: bridge
user-service-network:
driver: bridge
matching-service-network:
driver: bridge
question-service-network:
driver: bridge
collaboration-service-network:
driver: bridge
history-service-network:
driver: bridge
api-network:
driver: bridge
volumes:
progresDB: null