generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yaml
165 lines (165 loc) · 4.06 KB
/
docker-compose.yaml
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
version: "3"
include:
- backend_services/code_execution_service/judge0/docker-compose.yml
- backend_services/api_gateway/docker-compose.yaml
services:
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: ./Dockerfile.${ENV_TYPE:-dev}
image: peerprep_frontend
volumes:
- frontend_dist:/app/dist
ports:
# Expose port only for development mode.
# While in "production mode", frontend service will exit
# after building static files. Thus, no server will
# respond to the port in "production mode".
- 8006:8006
networks:
- client-side
base_api:
build:
context: ./backend_services
dockerfile: ./Dockerfile
image: peerprep_base_api
container_name: base_api
networks:
- backend-apis
env_file:
- ./backend.conf
users_api:
build:
context: ./backend_services/users_service/api
dockerfile: ../../API_Dockerfile
container_name: users_api
image: peerprep_users_api
networks:
- backend-apis
- users
environment:
- POSTGRES_HOST=users_database
- POSTGRES_PORT=5432
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- JWT_RS256_PRIVATE_KEY=${JWT_RS256_PRIVATE_KEY}
depends_on:
- users_database
- base_api
env_file:
- ./backend.conf
questions_api:
build:
context: ./backend_services/questions_service/api
dockerfile: ../../API_Dockerfile
image: peerprep_questions_api
container_name: questions_api
networks:
- backend-apis
- questions
environment:
- POSTGRES_HOST=questions_database
- POSTGRES_PORT=5432
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
depends_on:
- questions_database
- base_api
env_file:
- ./backend.conf
collaboration_api:
build:
context: ./backend_services/collaboration_service
image: peerprep_collaboration_api
container_name: collaboration_api
networks:
- backend-apis
- collaboration
depends_on:
- base_api
env_file:
- ./backend.conf
communication_api:
build:
context: ./backend_services/communication_service
dockerfile: Dockerfile
image: peerprep_communication_api
container_name: communication_api
networks:
- backend-apis
- communication
depends_on:
- base_api
env_file:
- ./backend.conf
matching_api:
build:
context: ./backend_services/matching_service
dockerfile: Dockerfile
image: peerprep_matching_api
container_name: matching_api
networks:
- backend-apis
- matching-queue
depends_on:
- base_api
env_file:
- ./backend.conf
code_execution_api:
build:
context: ./backend_services/code_execution_service
dockerfile: ../API_Dockerfile
image: peerprep_code_execution_api
container_name: code_execution_api
networks:
- backend-apis
- judge0
environment:
- JUDGE0_HOST=judge0_server
- JUDGE0_PORT=2358
depends_on:
- judge0_server
- base_api
env_file:
- ./backend.conf
users_database:
build:
context: ./backend_services/users_service/database
dockerfile: ../../DB_Dockerfile
image: peerprep_users_database
container_name: users_database
networks:
- users
volumes:
- users-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
env_file:
- ./backend.conf
questions_database:
build:
context: ./backend_services/questions_service/database
dockerfile: ../../DB_Dockerfile
image: peerprep_questions_database
container_name: questions_database
networks:
- questions
volumes:
- questions-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
env_file:
- ./backend.conf
volumes:
frontend_dist:
users-data:
external: true
questions-data:
external: true
networks:
users:
questions:
client-side:
backend-apis:
matching-queue:
collaboration:
communication: