-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
309 lines (290 loc) · 6.72 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
version: "3.8"
services:
redis:
image: redis:6-alpine
container_name: redis_users
ports:
- "6379:6379"
restart: always
networks:
- containers_network
postgis_users:
image: kartoza/postgis:13.0
container_name: postgis_users_container
expose:
- "5433"
ports:
- "5433:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=users_db
- POSTGRES_HOST=5433
command: -p 5433
volumes:
- ./users_pgdata:/var/lib/postgresql/data
networks:
- containers_network
postgis_hotels:
image: kartoza/postgis:13.0
container_name: postgis_hotels_container
expose:
- "5435"
ports:
- "5435:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=hotels_db
- POSTGRES_HOST=5435
command: -p 5435
volumes:
- ./hotels_pgdata:/var/lib/postgresql/data
networks:
- containers_network
postgis_comments:
image: kartoza/postgis:13.0
container_name: postgis_comments_container
expose:
- "5436"
ports:
- "5436:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=comments_db
- POSTGRES_HOST=5436
command: -p 5436
volumes:
- ./comments_pgdata:/var/lib/postgresql/data
networks:
- containers_network
postgis_images:
image: kartoza/postgis:13.0
container_name: postgis_images_container
expose:
- "5434"
ports:
- "5434:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=images_db
volumes:
- ./images_pgdata:/var/lib/postgresql/data
networks:
- containers_network
prometheus:
container_name: prometheus_container
image: prom/prometheus
volumes:
- ./docker/monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:Z
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention=20d'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- '9090:9090'
networks:
- containers_network
node_exporter:
container_name: node_exporter_container
image: prom/node-exporter
ports:
- '9101:9100'
networks:
- containers_network
grafana:
container_name: grafana_container
image: grafana/grafana
ports:
- '3000:3000'
networks:
- containers_network
jaeger:
container_name: jaeger_container
image: jaegertracing/all-in-one:1.21
environment:
- COLLECTOR_ZIPKIN_HTTP_PORT=9411
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 14268:14268
- 14250:14250
- 9411:9411
rabbitmq:
image: 'rabbitmq:3.8-management-alpine'
ports:
# The standard AMQP protocol port
- '5672:5672'
# HTTP management UI
- '15672:15672'
minio:
image: minio/minio:latest
ports:
- '9000:9000'
container_name: minio_aws_container
environment:
MINIO_ACCESS_KEY: minio123
MINIO_SECRET_KEY: minio123
command: server /data
networks:
- containers_network
mc:
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host rm local;
/usr/bin/mc config host add --quiet --api s3v4 local http://myminio:9000 minio123 minio123;
/usr/bin/mc rb --force local/images/;
/usr/bin/mc mb --quiet local/images/;
/usr/bin/mc policy set public local/images;
"
networks:
- containers_network
users_microservice:
container_name: users_microservice
build:
context: .
dockerfile: cmd/users/Dockerfile
ports:
- "5001:5001"
- "7071:7071"
environment:
- PORT=5001
- CONFIG=docker
- CFG_PATH=cmd/users/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./users:/app
networks:
- containers_network
sessions_microservice:
container_name: sessions_microservice
build:
context: app/sessions
dockerfile: cmd/sessions/Dockerfile
ports:
- "5000:5000"
- "7070:7070"
environment:
- PORT=5000
- CONFIG=docker
- CFG_PATH=cmd/sessions/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./sessions:/app
networks:
- containers_network
images_microservice:
container_name: images_microservice
build:
context: app/images
dockerfile: cmd/images/Dockerfile
ports:
- "5002:5002"
- "7072:7072"
environment:
- PORT=5002
- CONFIG=docker
- CFG_PATH=cmd/images/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./images:/app
networks:
- containers_network
hotels_microservice:
container_name: hotels_microservice
build:
context: app/hotels
dockerfile: cmd/hotels/Dockerfile
ports:
- "5003:5003"
- "7073:7073"
environment:
- PORT=5003
- CONFIG=docker
- CFG_PATH=cmd/hotels/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./hotels:/app
networks:
- containers_network
comments_microservice:
container_name: comments_microservice
build:
context: app/comments
dockerfile: cmd/comments/Dockerfile
ports:
- "5004:5004"
- "7074:7074"
environment:
- PORT=5004
- CONFIG=docker
- CFG_PATH=cmd/comments/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./comments:/app
networks:
- containers_network
api_gateway:
container_name: api_gateway
build:
context: app/gateway
dockerfile: cmd/gateway/Dockerfile
ports:
- "5005:5005"
- "7075:7075"
environment:
- PORT=5004
- CONFIG=docker
- CFG_PATH=cmd/gateway/config/config-docker.yml
depends_on:
- redis
- prometheus
- node_exporter
- grafana
restart: always
volumes:
- ./gateway:/app
networks:
- containers_network
networks:
containers_network:
driver: bridge