generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDocker-compose.dev.yml
169 lines (158 loc) · 5.91 KB
/
Docker-compose.dev.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
version: '3'
services:
rabbitmq3:
container_name: peerprep-rabbitmq
image: rabbitmq:3-management
environment:
- ./apps/backend/queue/.env.dev
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 10s
timeout: 10s
retries: 5
postgres:
image: postgres
container_name: peerprep-postgres
restart: always
env_file:
- ./apps/backend/user/.env.dev
ports:
- "5432:5432" # Map postgres container's port 5432 to host's port 5432
networks:
- peerprep-network
peerprep-frontend:
container_name: peerprep-frontend
image: peerprep-frontend # Name of the container
restart: always
build:
context: ./apps/frontend # Build context is the path to the frontend directory
dockerfile: Dockerfile.frontend.dev # Path to the Dockerfile for the frontend
ports:
- "3000:3000" # Map frontend container's port 3000 to host's port 3000
# volumes:
# - ./apps/frontend/.env.local:/app/.env.local # Mount the frontend directory as a volume
environment:
- ./apps/frontend/.env.local
depends_on:
- peerprep-user # Ensure that the backend service is started first
- peerprep-question # Ensure that the backend service is started first
- peerprep-queue # Ensure that the backend service is started first
- peerprep-session # Ensure that the backend service is started first
- peerprep-history # Ensure that the backend service is started first
networks:
- peerprep-network
peerprep-question:
container_name: peerprep-question # Name of the container
image: peerprep-question # Name of the image
restart: always
build:
context: ./apps/backend/question # Build context is the path to the backend directory
dockerfile: Dockerfile.question.dev # Path to the Dockerfile for the backend
ports:
- "8000:8000" # Map backend container's port 8000 to host's port 8000
# volumes:
# - ./apps/backend/question:/app # Mount the backend directory as a volume
environment:
- ./apps/backend/question/.env.dev
networks:
- peerprep-network
peerprep-user:
container_name: peerprep-user # Name of the container
image: peerprep-user # Name of the image
restart: always
build:
context: ./apps/backend/user # Build context is the path to the backend directory
dockerfile: Dockerfile.user.dev # Path to the Dockerfile for the backend
ports:
- "8001:8001" # Map backend container's port 8000 to host's port 8000
# volumes:
# - ./apps/backend/user:/app # Mount the backend directory as a volume
environment:
- ./apps/backend/user/.env.dev
depends_on:
postgres: # Ensure that the backend service is started first
condition: service_started
networks:
- peerprep-network
peerprep-queue:
container_name: peerprep-queue # Name of the container
image: peerprep-queue
restart: always
build:
context: ./apps/backend/queue # Build context is the path to the backend directory
dockerfile: Dockerfile.queue.dev # Path to the Dockerfile for the backend
ports:
- "8080:8080" # Map backend container's port 8080 to host's port 8080
environment:
- ./apps/backend/queue/.env.dev
networks:
- peerprep-network
depends_on:
rabbitmq3:
condition: service_healthy
peerprep-session:
container_name: peerprep-session
image: peerprep-session
restart: always
build:
context: ./apps/backend/session
dockerfile: Dockerfile.session.dev
ports:
- "8250:8250"
- "8251:8251"
# volumes:
# - ./apps/backend/question:/app
environment:
- ./apps/backend/session/.env.dev
networks:
- peerprep-network
peerprep-history:
container_name: peerprep-history
image: peerprep-history
restart: always
build:
context: ./apps/backend/history
dockerfile: Dockerfile.history.dev
ports:
- "8003:8003"
# volumes:
# - ./apps/backend/question:/app
environment:
- ./apps/backend/session/.env.dev
networks:
- peerprep-network
peerprep-chat:
container_name: peerprep-chat
image: peerprep-chat
restart: always
build:
context: ./apps/backend/chat
dockerfile: Dockerfile.chat.dev
ports:
- "8082:8082"
environment:
- ./apps/backend/chat/.env.dev
networks:
- peerprep-network
peerprep-codeexec:
container_name: peerprep-codeexec
image: peerprep-codeexec
restart: always
build:
context: ./apps/backend/codeExecution
dockerfile: Dockerfile.codeexec.dev
ports:
- "8420:8420"
# volumes:
# - ./apps/backend/question:/app
environment:
- ./apps/backend/codeExecution/.env.dev
networks:
- peerprep-network
# Define a custom network for your services
networks:
peerprep-network:
driver: bridge