-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·153 lines (143 loc) · 3.35 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
services:
question:
image: golang:1.23-alpine
container_name: peer-prep-question
working_dir: /app
env_file:
- ./peer-prep-be/.env
volumes:
- ./peer-prep-be:/app
command: sh -c "go run ./src/server.go"
ports:
- "8080:8080"
environment:
- CGO_ENABLED=0
depends_on:
- mongo
networks:
- ihatefrontend
user:
image: node:18-alpine
container_name: peer-prep-user
working_dir: /app
env_file:
- ./peer-prep-user/user-service/.env
volumes:
- ./peer-prep-user/user-service:/app
- /app/node_modules
environment:
- TZ=Asia/Kuala_Lumpur
command: >
sh -c "apk add --no-cache tzdata\ && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
echo $TZ > /etc/timezone &&
npm install &&
npm start"
ports:
- "3001:3001"
depends_on:
- mongo
networks:
- ihatefrontend
mongo:
image: mongo:6.0
container_name: peer-prep-mongo
volumes:
- mongo_data:/data/db
ports:
- "27017:27017"
networks:
- ihatefrontend
rabbitmq:
image: node:18-alpine
container_name: 'rabbitmq'
working_dir: /app
environment:
- AMQP_SERVER=amqps://lguugvwb:UtQY1D0zOoX8s0ZvR4GunuRDk0xv8UuI@octopus.rmq3.cloudamqp.com/lguugvwb
env_file:
- ./message-queue/.env
volumes:
- ./message-queue:/app
- rabbitmq_data:/var/lib/rabbitmq
command: sh -c "npm install && npm start"
ports:
- 3002:3002
networks:
- rabbitmqNetwork
- ihatefrontend
collaboration:
image: node:16-alpine
container_name: peer-prep-collab
working_dir: /app
env_file:
- ./peer-prep-collab/.env
volumes:
- ./peer-prep-collab:/app
command: sh -c "npm install && npm start"
ports:
- "4003:4003"
depends_on:
- mongo
- question
- rabbitmq
environment:
- QUESTIONS_SERVICE_URL=http://question:8080
- RABBITMQ_URL=http://rabbitmq:3002
- AMQP_SERVER=amqps://lguugvwb:UtQY1D0zOoX8s0ZvR4GunuRDk0xv8UuI@octopus.rmq3.cloudamqp.com/lguugvwb
networks:
- rabbitmqNetwork
- ihatefrontend
websocket:
image: node:18-alpine
container_name: collab-websocket
volumes:
- ./code-websocket:/app
working_dir: /app
command: sh -c "npm install && npm start"
ports:
- "8081:8081"
networks:
- ihatefrontend
chat-websocket:
image: node:18-alpine
container_name: chat-websocket
working_dir: /app
volumes:
- ./chat-websocket:/app
command: sh -c "npm install && npm start"
ports:
- "8082:8082"
networks:
- ihatefrontend
match-websocket:
image: node:18-alpine
container_name: match-websocket
working_dir: /app
volumes:
- ./match-websocket:/app
command: sh -c "npm install && npm start"
ports:
- "8083:8083"
networks:
- ihatefrontend
nginx:
image: nginx:alpine
container_name: peer-prep-gateway
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- question
- user
- collaboration
- websocket
networks:
- ihatefrontend
networks:
rabbitmqNetwork:
driver: bridge
ihatefrontend:
driver: bridge
volumes:
mongo_data:
rabbitmq_data: