generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
172 lines (161 loc) · 4.82 KB
/
docker-compose.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
version: '3.9'
services:
frontend:
depends_on:
- user-service
- matching-service
- collaboration-service
- history-service
- communication-service
- question-service
- code-execution-service
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile.frontend
volumes:
- ./frontend:/app/frontend
- /app/frontend/node_modules
ports:
- '5173:5173'
environment:
VITE_USER_SERVICE_URL: 'http://localhost:8000/api/'
VITE_HISTORY_SERVICE_URL: 'http://localhost:8020/api/'
VITE_QUESTION_SERVICE_URL: 'http://localhost:8010/questions/'
VITE_CODE_EXECUTION_SERVICE_URL: 'http://localhoste:5001/'
VITE_COMMUNICATION_SERVICE_URL: 'ws://localhost:5002/chat/ws/'
VITE_MATCHING_SERVICE_URL: 'http://localhost:8002/'
VITE_COLLABORATION_SERVICE_URL: 'http://localhost:8004/'
networks:
- cs3219-project-network
user-service:
container_name: user-service
hostname: user-service
depends_on:
- mongo_db
build:
context: ./backend
dockerfile: Dockerfile.user
volumes:
- ./backend/user-service:/app/backend/user-service
- /app/backend/user-service/.venv
ports:
- '8000:8000'
environment:
MONGODB_CONNECTION_STRING: "mongodb+srv://naranghardik16:[email protected]/?retryWrites=true&w=majority"
JWT_SECRET_KEY: fa75420757c0f905d126c3b2a626c0db
JWT_REFRESH_SECRET_KEY: 08b7d5a146b83a57d9e59339ba3b5ade
HASHING_ALGORITHM: HS256
networks:
- cs3219-project-network
question-service:
container_name: question-service
hostname: question-service
depends_on:
- mongo_db
build:
context: ./backend
dockerfile: Dockerfile.question
volumes:
- ./backend/question-service:/app/backend/question-service
- /app/backend/question-service/.venv
ports:
- '8010:8010'
environment:
MONGODB_CONNECTION_STRING: "mongodb+srv://naranghardik16:[email protected]/?retryWrites=true&w=majority"
networks:
- cs3219-project-network
history-service:
container_name: history-service
hostname: history-service
depends_on:
- mongo_db
build:
context: ./backend
dockerfile: Dockerfile.history
volumes:
- ./backend/history-service:/app/backend/history-service
- /app/backend/history-service/.venv
ports:
- '8020:8020'
environment:
MONGODB_CONNECTION_STRING: "mongodb+srv://naranghardik16:[email protected]/?retryWrites=true&w=majority"
networks:
- cs3219-project-network
code-execution-service:
container_name: code-execution-service
hostname: code-execution-service
build:
context: ./backend
dockerfile: Dockerfile.codeexec
volumes:
- ./backend/code-execution-service:/app/backend/code-execution-service
- /app/backend/code-execution-service/.venv
ports:
- '5001:5001'
networks:
- cs3219-project-network
communication-service:
container_name: communication-service
hostname: communication-service
depends_on:
- mongo_db
build:
context: ./backend
dockerfile: Dockerfile.communication
volumes:
- ./backend/communication-service:/app/backend/communication-service
- /app/backend/communication-service/.venv
ports:
- '5002:5002'
environment:
MONGODB_CONNECTION_STRING: "mongodb+srv://naranghardik16:[email protected]/?retryWrites=true&w=majority"
networks:
- cs3219-project-network
matching-service:
container_name: matching-service
hostname: matching-service
depends_on:
- question-service
build:
context: ./backend
dockerfile: Dockerfile.matching
volumes:
- ./backend/matching-service:/app/backend/matching-service
- /app/backend/matching-service/node_modules
ports:
- '8002:8002'
environment:
QUESTION_SERVICE: http://question-service:8010/
networks:
- cs3219-project-network
collaboration-service:
container_name: collaboration-service
hostname: collaboration-service
build:
context: ./backend
dockerfile: Dockerfile.collaboration
volumes:
- ./backend/collaboration-service:/app/backend/collaboration-service
- /app/backend/collaboration-service/node_modules
ports:
- '8004:8004'
networks:
- cs3219-project-network
mongo_db:
container_name: mongo_db
image: mongo:latest
restart: always
ports:
- '27017:27017'
volumes:
- mongo_db:/data/db
networks:
- cs3219-project-network
logging:
driver: 'none'
networks:
cs3219-project-network:
driver: bridge
volumes:
mongo_db: {}