-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
203 lines (195 loc) · 3.87 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# docker-compose.yml
version: '3'
services:
# Nginx
nginx:
image: nginx:latest
ports:
- 3000:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- target-service
- sharpshooter-service
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
# RabbitMQ
rabbitmq:
image: rabbitmq:3-management
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password
ports:
- 5672:5672
- 15672:15672
networks:
- default
volumes:
- ./rabbitmq/data:/var/lib/rabbitmq
deploy:
resources:
limits:
cpus: '0.75'
memory: 500M
# MongoDB
mongodb:
image: mongo
ports:
- 27018:27017
networks:
- default
volumes:
- ./mongodb/data:/data/db
deploy:
resources:
limits:
cpus: '0.50'
memory: 300M
###########################################
### Micro Services ########################
###########################################
# Target service
target-service:
build: ./target-service
ports:
- 3001:3001
depends_on:
- rabbitmq
- mongodb
networks:
- default
volumes:
- ./target-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/target-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# Sharpshooter service
sharpshooter-service:
build: ./sharpshooter-service
ports:
- 3002:3002
depends_on:
- rabbitmq
- mongodb
networks:
- default
volumes:
- ./sharpshooter-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/sharpshooter-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# User service
user-service:
build: ./user-service
ports:
- 3003:3003
depends_on:
- rabbitmq
- mongodb
networks:
- default
volumes:
- ./user-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/user-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
###########################################
### Other Services ########################
###########################################
# Mail service
mail-service:
build: ./mail-service
ports:
- 3004:3004
depends_on:
- rabbitmq
networks:
- default
volumes:
- ./mail-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/mail-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# Score service
score-service:
build: ./score-service
ports:
- 3005:3005
depends_on:
- rabbitmq
networks:
- default
volumes:
- ./score-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/score-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# Read service
read-service:
build: ./read-service
ports:
- 3006:3006
depends_on:
- rabbitmq
networks:
- default
volumes:
- ./read-service:/usr/src/app
env_file:
- ./envFiles/read-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# Clock service
clock-service:
build: ./clock-service
ports:
- 3007:3007
depends_on:
- rabbitmq
networks:
- default
volumes:
- ./clock-service:/usr/src/app
- /usr/src/app/node_modules
env_file:
- ./envFiles/clock-service.env
deploy:
resources:
limits:
cpus: '0.50'
memory: 200M
# Network
networks:
default:
driver: bridge