forked from hashgraph/guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
304 lines (284 loc) · 7.09 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
# 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
mongo-express:
image: mongo-express:1.0.2-20
expose:
- 8081
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_SITE_BASEURL: /mongo-admin # default credentials: admin/pass
depends_on:
- mongo
ipfs-node:
image: ipfs/kubo:v0.26.0
ports:
- "5001:5001"
- "4001:4001"
- "8080:8080"
volumes:
- ipfs_data:/data/ipfs:rw
- ipfs_export:/export:rw
message-broker:
image: nats:2.9.24
expose:
- 4222
ports:
- '8222:8222'
command: '--http_port 8222'
vault:
image: hashicorp/vault:1.12.11
expose:
- 8200
ports:
- '8200:8200'
environment:
VAULT_SERVER: "http://0.0.0.0:8200"
VAULT_DEV_ROOT_TOKEN_ID: "1234"
cap_add:
- IPC_LOCK
volumes:
- ./file:/vault/file:rw
- ./config:/vault/config:rw
notification-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./notification-service/Dockerfile
depends_on:
- message-broker
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
volumes:
- ./notification-service/configs:/usr/local/notification-service/configs:ro
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}
expose:
- 6555
volumes:
- ./logger-service/configs:/usr/local/logger-service/configs:ro
worker-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./worker-service/Dockerfile
depends_on:
ipfs-node:
condition: service_healthy
auth-service:
condition: service_started
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
volumes:
- ./worker-service/tls:/usr/local/worker-service/tls:ro
- ./worker-service/configs:/usr/local/worker-service/configs:ro
deploy:
replicas: 2
auth-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./auth-service/Dockerfile.demo
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
- vault
- message-broker
- logger-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
- 5005
api-gateway:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./api-gateway/Dockerfile.demo
expose:
- 3002
- 6555
depends_on:
- mongo
- message-broker
- guardian-service
- auth-service
- logger-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
volumes:
- ./api-gateway/configs:/usr/local/api-gateway/configs:ro
ai-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./ai-service/Dockerfile
expose:
- 3013
depends_on:
- mongo
- message-broker
- logger-service
volumes:
- ./ai-service/data:/usr/local/ai-service/data:rw
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
- VECTOR_STORAGE_PATH=./faiss-vector
- DOCS_STORAGE_PATH=./data/generated-data
policy-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./policy-service/Dockerfile
ports:
- "5006:5006"
depends_on:
- mongo
- message-broker
- auth-service
- logger-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 50000-60000
- 5006
volumes:
- ./policy-service/tls:/usr/local/policy-service/tls:ro
- ./policy-service/configs:/usr/local/policy-service/configs:ro
guardian-service:
env_file:
- ./configs/.env.${GUARDIAN_ENV}.guardian.system
build:
context: .
dockerfile: ./guardian-service/Dockerfile
ports:
- "5007:5007"
volumes:
- ./guardian-service/tls:/usr/local/guardian-service/tls:ro
- ./guardian-service/configs:/usr/local/guardian-service/configs:ro
depends_on:
- mongo
- message-broker
- auth-service
- logger-service
- worker-service
- policy-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
- 5007
application-events:
build:
context: .
dockerfile: application-events/Dockerfile
expose:
- 3012
ports:
- "3012:3012"
depends_on:
- mongo
- message-broker
- guardian-service
- auth-service
- logger-service
mrv-sender:
build:
context: .
dockerfile: ./mrv-sender/Dockerfile
expose:
- 3003
- 5008
ports:
- "5008:5008"
topic-viewer:
build:
context: .
dockerfile: ./topic-viewer/Dockerfile
expose:
- 3006
- 5009
ports:
- "5009:5009"
web-proxy:
build:
context: .
dockerfile: ./web-proxy/Dockerfile
ports:
- "3000:80"
depends_on:
- guardian-service
- auth-service
- api-gateway
- mrv-sender
- mongo-express
prometheus:
image: prom/prometheus:v2.44.0
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- "9090:9090"
networks:
- monitoring
grafana:
image: grafana/grafana:10.0.10
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/etc/grafana/dashboards
environment:
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_SERVER_HTTP_PORT=9080
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/prometheus-dashboard.json
ports:
- "9080:9080"
networks:
- monitoring
volumes:
prometheus_data:
grafana_data:
ipfs_data:
ipfs_export:
networks:
monitoring:
driver: bridge