generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDocker-compose.prod.yml
133 lines (124 loc) · 4.98 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
version: '3'
services:
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.prod # 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.production.local
# depends_on:
# - peerprep-user # Ensure that the backend service is started first
# - peerprep-question # 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.prod # 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.prod
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.prod # 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.prod
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.prod # Path to the Dockerfile for the backend
ports:
- "8080:8080" # Map backend container's port 8000 to host's port 8000
environment:
- ./apps/backend/queue/.env.prod
networks:
- peerprep-network
peerprep-session:
container_name: peerprep-session # Name of the container
image: peerprep-session # Name of the image
restart: always
build:
context: ./apps/backend/session # Build context is the path to the backend directory
dockerfile: Dockerfile.session.prod # Path to the Dockerfile for the backend
ports:
- "8250:8250" # Map backend container's port 8250 to host's port 8250
# volumes:
# - ./apps/backend/question:/app # Mount the backend directory as a volume
environment:
- ./apps/backend/session/.env.prod
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: