-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.dev.yml
437 lines (412 loc) · 13.5 KB
/
docker-compose.dev.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
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: .
target: final
dockerfile: BuildStatic.dockerfile
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}
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
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}
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
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}
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
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}
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
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}
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
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}
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
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}
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
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}
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
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_
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_:
net_exist:
net_agent:
volumes:
data_profile:
data_auth:
data_connection:
data3:
data_exist: