-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.dev.mnt.yml
587 lines (559 loc) · 15.6 KB
/
docker-compose.dev.mnt.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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
version: "3.9"
services:
apigateway:
container_name: apigateway_krakend
build:
context: .
dockerfile: Krakend.dockerfile
restart: always
networks:
- net_apigateway
- net_agent
volumes:
- ./conf/krakend.json:/etc/krakend/krakend.json
- ./conf/certs/pem/localhost.cert.pem:/certs/pem/localhost.cert.pem
- ./conf/certs/key/localhost.key.pem:/certs/key/localhost.key.pem
ports:
- 81:80
depends_on:
- notification
static:
container_name: static_srv_nginx
build:
context: .
dockerfile: BuildStatic.dockerfile
target: final
restart: always
networks:
- net_apigateway
volumes:
- "../nistagramstaticdata/data:/usr/share/nginx/html/data:ro"
- "../nistagramstaticdata/totp:/usr/share/nginx/html/totp:ro"
- ./conf/certs/pem/static.cert.pem:/etc/nginx/ssl/static.cert.pem
- ./conf/certs/key/static.key.pem:/etc/nginx/ssl/static.key.pem
- ./conf/static.default.conf:/etc/nginx/conf.d/default.conf
agent-static:
container_name: agent_static_srv_nginx
build:
context: .
target: agent-final
dockerfile: BuildStatic.dockerfile
restart: always
ports:
- 83:443
volumes:
- "../agentstaticdata/data:/usr/share/nginx/html/data:ro"
- ./conf/certs/pem/agent.cert.pem:/etc/nginx/ssl/agent.cert.pem
- ./conf/certs/key/agent.key.pem:/etc/nginx/ssl/agent.key.pem
- ./conf/agent-static.default.conf:/etc/nginx/conf.d/default.conf
profile:
container_name: profile_ms
restart: always
environment:
DB_USERNAME: ${DB_PROFILE_USERNAME}
DB_PASSWORD: ${DB_PROFILE_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
args:
ARG_TARGET_MS_GO: profile
dockerfile: Build.dockerfile
volumes:
- ./common_pass.txt:/nistagram/common_pass.txt:ro
- ./conf/certs/key/profile.key.pem:/nistagram/key.pem
- ./conf/certs/pem/profile.cert.pem:/nistagram/cert.pem
- ../logs/profile:/logs/profile
- ../nistagramstaticdata:/nistagramstaticdata
ports:
- 7000:8080
networks:
- net_apigateway
- net_db_relational
depends_on:
- db_relational
- tracing
auth:
container_name: auth_ms
restart: always
environment:
DB_USERNAME: ${DB_AUTH_USERNAME}
DB_PASSWORD: ${DB_AUTH_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
DB_SEC_ENC: ${DB_SEC_ENC}
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
args:
ARG_TARGET_MS_GO: auth
dockerfile: Build.dockerfile
volumes:
- ./conf/certs/key/auth.key.pem:/nistagram/key.pem
- ./conf/certs/pem/auth.cert.pem:/nistagram/cert.pem
- ../logs/auth:/logs/auth
- ../nistagramstaticdata/totp:/nistagramstaticdata/totp
ports:
- 7001:8080
networks:
- net_apigateway
- net_db_relational
depends_on:
- db_relational
- tracing
connection:
container_name: connection_ms
restart: always
environment:
DB_USERNAME: ${DB_CONNECTION_USERNAME}
DB_PASSWORD: ${DB_CONNECTION_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
args:
ARG_TARGET_MS_GO: connection
dockerfile: Build.dockerfile
volumes:
- ./conf/certs/key/connection.key.pem:/nistagram/key.pem
- ./conf/certs/pem/connection.cert.pem:/nistagram/cert.pem
- ../logs/connection:/logs/connection
ports:
- 7002:8080
networks:
- net_apigateway
- net_db_graph
depends_on:
- graphdb_connection
- tracing
post:
container_name: post_ms
restart: always
environment:
DB_USERNAME: ${DB_POST_USERNAME}
DB_PASSWORD: ${DB_POST_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
dockerfile: Build.dockerfile
args:
ARG_TARGET_MS_GO: post
volumes:
- "../nistagramstaticdata:/nistagramstaticdata"
- ./conf/certs/key/post.key.pem:/nistagram/key.pem
- ./conf/certs/pem/post.cert.pem:/nistagram/cert.pem
- ../logs/post:/logs/post
ports:
- 7003:8080
networks:
- net_apigateway
- net_mongo
depends_on:
- mongo1
- tracing
postreaction:
container_name: postreaction_ms
restart: always
environment:
DB_USERNAME: ${DB_POST_REACTION_USERNAME}
DB_PASSWORD: ${DB_POST_REACTION_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
dockerfile: Build.dockerfile
args:
ARG_TARGET_MS_GO: postreaction
volumes:
- ./conf/certs/key/postreaction.key.pem:/nistagram/key.pem
- ./conf/certs/pem/postreaction.cert.pem:/nistagram/cert.pem
- ../logs/postreaction:/logs/postreaction
ports:
- 7004:8080
networks:
- net_apigateway
- net_mongo
depends_on:
- mongo1
- tracing
agent:
container_name: agent_app
restart: always
environment:
DB_USERNAME: ${DB_AGENT_USERNAME}
DB_PASSWORD: ${DB_AGENT_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
DB_SEC_ENC: ${DB_SEC_ENC}
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
build:
context: .
args:
ARG_TARGET_MS_GO: agent
dockerfile: Build.dockerfile
volumes:
- ./conf/certs/key/agent.key.pem:/nistagram/key.pem
- ./conf/certs/pem/agent.cert.pem:/nistagram/cert.pem
- ../agentstaticdata:/agentstaticdata
ports:
- 82:8080
networks:
- net_db_relational
- net_agent
- net_exist
depends_on:
- db_relational
- exist
campaign:
container_name: campaign_ms
restart: always
environment:
DB_USERNAME: ${DB_CAMPAIGN_USERNAME}
DB_PASSWORD: ${DB_CAMPAIGN_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
DB_SEC_ENC: ${DB_SEC_ENC}
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
args:
ARG_TARGET_MS_GO: campaign
dockerfile: Build.dockerfile
volumes:
- ./conf/certs/key/campaign.key.pem:/nistagram/key.pem
- ./conf/certs/pem/campaign.cert.pem:/nistagram/cert.pem
- ../logs/campaign:/logs/campaign
ports:
- 7006:8080
networks:
- net_apigateway
- net_db_relational
depends_on:
- db_relational
- tracing
monitoring:
container_name: monitoring_ms
restart: always
environment:
DB_USERNAME: ${DB_MONITORING_USERNAME}
DB_PASSWORD: ${DB_MONITORING_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
DB_SEC_ENC: ${DB_SEC_ENC}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
dockerfile: Build.dockerfile
args:
ARG_TARGET_MS_GO: monitoring
volumes:
- ./conf/certs/key/monitoring.key.pem:/nistagram/key.pem
- ./conf/certs/pem/monitoring.cert.pem:/nistagram/cert.pem
- ../logs/monitoring:/logs/monitoring
ports:
- 7007:8080
networks:
- net_apigateway
- net_mongo
depends_on:
- mongo1
- tracing
notification:
container_name: notification_ms
restart: always
environment:
DB_USERNAME: ${DB_NOTIFICATION_USERNAME}
DB_PASSWORD: ${DB_NOTIFICATION_PASSWORD}
DOCKER_ENV_SET_DEV: ""
MICROSERVICE_JWT_TOKEN_SECRET: ${MICROSERVICE_JWT_TOKEN_SECRET}
PUBLIC_JWT_TOKEN_SECRET: ${PUBLIC_JWT_TOKEN_SECRET}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
DB_SEC_ENC: ${DB_SEC_ENC}
JAEGER_AGENT_HOST: tracing
JAEGER_AGENT_PORT: 6831
JAEGER_SAMPLER_MANAGER_HOST_PORT: jaeger:5778
JAEGER_SAMPLER_TYPE: const
JAEGER_SAMPLER_PARAM: 1
build:
context: .
dockerfile: Build.dockerfile
args:
ARG_TARGET_MS_GO: notification
volumes:
- ./conf/certs/key/notification.key.pem:/nistagram/key.pem
- ./conf/certs/pem/notification.cert.pem:/nistagram/cert.pem
- ../logs/notification:/logs/notification
- ../nistagramstaticdata:/nistagramstaticdata
ports:
- 7008:8080
networks:
- net_apigateway
- net_mongo
depends_on:
- mongo1
- tracing
db_relational:
container_name: db_mysql
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_PROFILE_PASSWORD}
networks:
- net_db_relational
ports:
- 3306:3306 #dev
volumes:
- type: volume
source: data_profile
target: /var/lib/mysql
- "./conf/dev/mysql:/docker-entrypoint-initdb.d"
# cache_rbac_:
# container_name: cache_redis1
# image: redis
# restart: always
# networks:
# - net_
# volumes:
# - ./conf/redis.conf:/usr/local/etc/redis/redis.conf
# command: redis-server /usr/local/etc/redis/redis.conf
graphdb_connection:
container_name: graphdb_neo4j
image: neo4j
restart: always
environment:
- NEO4J_dbms_connector_bolt_advertised__address=0.0.0.0:7687
- NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687
- NEO4J_AUTH=${DB_CONNECTION_USERNAME}/${DB_CONNECTION_PASSWORD}
networks:
- net_db_graph
ports:
- 7474:7474
- 7687:7687 # mora jer je neki mozak pravio da se komunikacija sa bazom radi kompletno iz fronta web aplikacije
volumes:
- type: volume
source: data_connection
target: /data
mongo1:
container_name: nosqldb_mongo1
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${DB_POST_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${DB_POST_PASSWORD}
networks:
- net_mongo
volumes:
- type: volume
source: data3
target: /data/db
exist:
image: existdb/existdb:release
container_name: exist-db
restart: always
ports:
- 8666:8080
volumes:
- type: volume
source: data_exist
target: /exist-data
networks:
- net_exist
mongo-express:
image: mongo-express
restart: always
ports:
- 8082:8081
environment:
ME_CONFIG_MONGODB_SERVER: mongo1
ME_CONFIG_MONGODB_ADMINUSERNAME: ${DB_POST_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${DB_POST_PASSWORD}
networks:
- net_mongo
adminer:
image: adminer
restart: always
networks:
- net_db_relational
ports:
- 8080:8080
# redis-commander:
# container_name: redis-commander
# image: rediscommander/redis-commander
# restart: always
# environment:
# - REDIS_HOST=cache_rbac_
# - REDIS_PORT=6379
# - REDIS_PASSWORD=helloworld
# ports:
# - 8081:8081
# networks:
# - net_
# depends_on:
# - cache_rbac_
prometheus:
image: prom/prometheus
container_name: cprometheus
restart: always
#stdin_open: true # docker run -i
#tty: true # docker run -t
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--log.level=debug'
ports:
- 9090:9090
networks:
- net_apigateway
- net_prometheus
volumes:
- ./conf/prometheus:/etc/prometheus
- type: volume
source: data_prometheus
target: /prometheus
depends_on:
- apigateway
influx:
image: influxdb:1.8-alpine
container_name: cinflux
restart: always
environment:
INFLUXDB_DB: ${INFLUXDB_DB}
INFLUXDB_USER: ${INFLUXDB_USER}
INFLUXDB_USER_PASSWORD: ${INFLUXDB_USER_PASSWORD}
INFLUXDB_ADMIN_USER: ${INFLUXDB_ADMIN_USER}
INFLUXDB_ADMIN_PASSWORD: ${INFLUXDB_ADMIN_PASSWORD}
ports:
- 8096:8086
networks:
- net_apigateway
- net_influx
volumes:
- type: volume
source: data_influx1
target: /var/lib/influxdb
- type: volume
source: data_influx2
target: /var/lib/influxdb2
grafana:
image: grafana/grafana
container_name: cgrafana
environment:
GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource"
restart: always
ports:
- 3003:3000
user: "104"
volumes:
- type: volume
source: data_grafana
target: /var/lib/grafana
depends_on:
- prometheus
- influx
networks:
- net_prometheus
- net_influx
nginxexporter:
image: nginx/nginx-prometheus-exporter
container_name: cnginx_exporter
restart: always
environment:
SCRAPE_URI: http://static:80/metrics
TELEMETRY_PATH: /prometheus
NGINX_RETRIES: 10
ports:
- 9113:9113
depends_on:
- static
networks:
- net_apigateway
tracing:
image: jaegertracing/all-in-one
container_name: jaeger
ports:
- 6831:6831/udp
- 6832:6832/udp
- 16686:16686
- 14268:14268
- 14250:14250
networks:
- net_apigateway
message_broker:
container_name: redis
image: redis
restart: always
networks:
- net_apigateway
ports:
- 6379:6379
volumes:
- ./conf/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
net_apigateway:
net_db_relational:
net_db_graph:
net_mongo:
net_prometheus:
net_influx:
net_agent:
# net_:
net_exist:
volumes:
data_profile:
data_auth:
data_connection:
data3:
data_prometheus:
data_grafana:
data_influx1:
data_influx2:
data_exist: