forked from hashgraph/guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-analytics.yml
95 lines (89 loc) · 2.41 KB
/
docker-compose-analytics.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
# https://docs.docker.com/compose/environment-variables/envvars-precedence/
# Environment leverage the gerarchy defined in the docker compose between "env_file" and "environment" attributes
# ecosystem variables defined in the "env_file" .env.${GUARDIAN_ENV}.guardian.system
# specific service variables defined by "environment" can override what is defined in the ecosystem file
version: "3.8"
services:
mongo:
image: mongo:6.0.13
command: "--setParameter allowDiskUseByDefault=true"
restart: always
expose:
- 27017
message-broker:
image: nats:2.9.24
expose:
- 4222
ports:
- '8222:8222'
command: '--http_port 8222'
logger-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./logger-service/Dockerfile
depends_on:
- message-broker
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
volumes:
- ./logger-service/configs:/usr/local/logger-service/configs:ro
auth-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./auth-service/Dockerfile
ports:
- '5005:5005'
volumes:
- ./auth-service/tls:/usr/local/auth-service/tls:ro
- ./auth-service/configs:/usr/local/auth-service/configs:ro
depends_on:
- mongo
- message-broker
- logger-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
- 5005
worker-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./worker-service/Dockerfile
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
depends_on:
auth-service:
condition: service_started
expose:
- 6555
volumes:
- ./worker-service/tls:/usr/local/worker-service/tls:ro
- ./worker-service/configs:/usr/local/worker-service/configs:ro
deploy:
replicas: 10
analytics-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./analytics-service/Dockerfile
depends_on:
- message-broker
- worker-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
ports:
- "3000:3020"
volumes:
- ./analytics-service/configs:/usr/local/analytics-service/configs:ro
networks:
monitoring:
driver: bridge