-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathdocker-compose-quickstart-build.yml
More file actions
239 lines (219 loc) · 5.99 KB
/
Copy pathdocker-compose-quickstart-build.yml
File metadata and controls
239 lines (219 loc) · 5.99 KB
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
# This file is linted and formatted using Docker Compose Linter (https://github.com/zavoloklom/docker-compose-linter):
# npx dclint . --fix=true
# Please note variables defined in the "environment" section will override the same variables defined in the "env_file"
# See # https://docs.docker.com/compose/environment-variables/envvars-precedence/ for more details
# YAML anchor that contains common configuration elements for our services
x-service-template: &service-template
init: true
env_file:
- ./configs/.env.quickstart.guardian.system
environment:
GUARDIAN_ENV: ${GUARDIAN_ENV}
name: guardian-quickstart
services:
api-gateway:
build:
context: .
dockerfile: ./api-gateway/Dockerfile.demo
depends_on:
- auth-service
- cache
- guardian-service
- logger-service
- message-broker
- mongo
volumes:
- ./api-gateway/configs:/usr/local/app/api-gateway/configs:ro
<<: *service-template
expose:
- '3002'
- '6555'
auth-service:
build:
context: .
dockerfile: ./auth-service/Dockerfile.demo
depends_on:
- logger-service
- message-broker
- mongo
volumes:
- ./auth-service/tls:/usr/local/app/auth-service/tls:ro
- ./auth-service/configs:/usr/local/app/auth-service/configs:ro
<<: *service-template
expose:
- '6555'
- '5005'
cache:
image: registry.redict.io/redict:7.3.6-alpine
restart: always
expose:
- '6379'
init: true
guardian-service:
build:
context: .
dockerfile: ./guardian-service/Dockerfile
depends_on:
- auth-service
- logger-service
- message-broker
- mongo
- policy-service
- worker-service
volumes:
- ./guardian-service/tls:/usr/local/app/guardian-service/tls:ro
- ./guardian-service/configs:/usr/local/app/guardian-service/configs:ro
environment:
OPERATOR_ID: ${OPERATOR_ID}
OPERATOR_KEY: ${OPERATOR_KEY}
<<: *service-template
expose:
- '6555'
- '5007'
ipfs-node:
image: ipfs/kubo:v0.41.0
volumes:
- ipfs_data:/data/ipfs:rw
- ipfs_export:/export:rw
environment:
IPFS_TELEMETRY: off # valid options: 'on' (default), 'off', 'auto' (https://github.com/ipfs/kubo/blob/master/docs/telemetry.md)
ports:
- '127.0.0.1:4001:4001'
- '127.0.0.1:5001:5001'
- '127.0.0.1:8080:8080'
init: true
logger-service:
image: gcr.io/hedera-registry/logger-service:${GUARDIAN_VERSION:-latest}
depends_on:
- message-broker
volumes:
- ./logger-service/configs:/usr/local/app/logger-service/configs:ro
<<: *service-template
expose:
- '6555'
message-broker:
image: nats:2.9.25
volumes:
- ./configs/nats.conf:/etc/nats/nats.conf
ports:
- '127.0.0.1:8222:8222'
command: "-c /etc/nats/nats.conf --http_port 8222"
expose:
- '4222'
init: true
mongo:
image: mongo:6.0.26
# command: "--setParameter allowDiskUseByDefault=true"
command: "--setParameter allowDiskUseByDefault=true --quiet --logpath /dev/null" # use this command to reduce log noise
restart: always
expose:
- '27017'
init: true
notification-service:
image: gcr.io/hedera-registry/notification-service:${GUARDIAN_VERSION:-latest}
depends_on:
- message-broker
volumes:
- ./notification-service/configs:/usr/local/app/notification-service/configs:ro
<<: *service-template
policy-service:
build:
context: .
dockerfile: ./policy-service/Dockerfile
depends_on:
- auth-service
- logger-service
- message-broker
- mongo
volumes:
- ./policy-service/tls:/usr/local/app/policy-service/tls:ro
- ./policy-service/configs:/usr/local/app/policy-service/configs:ro
# Uncomment for PYTHON_SANDBOX_MODE=docker:
# - /var/run/docker.sock:/var/run/docker.sock
<<: *service-template
expose:
- '5006'
# Uncomment for PYTHON_SANDBOX_MODE=docker:
# python-sandbox:
# build:
# context: ./policy-service/docker/python-sandbox
# dockerfile: Dockerfile
# image: guardian/python-sandbox:latest
queue-service:
build:
context: .
dockerfile: ./queue-service/Dockerfile
depends_on:
- logger-service
- message-broker
- mongo
volumes:
- ./queue-service/configs:/usr/local/app/queue-service/configs:ro
<<: *service-template
expose:
- '6555'
topic-listener-service:
build:
context: .
dockerfile: ./topic-listener-service/Dockerfile
depends_on:
- message-broker
- mongo
- queue-service
volumes:
- ./topic-listener-service/configs:/usr/local/app/topic-listener-service/configs:ro
<<: *service-template
expose:
- '6555'
topic-viewer:
build:
context: .
dockerfile: ./topic-viewer/Dockerfile
expose:
- '3006'
- '5009'
init: true
web-proxy:
build:
context: .
dockerfile: ./web-proxy/Dockerfile.demo
depends_on:
- api-gateway
- auth-service
- guardian-service
environment:
GATEWAY_CLIENT_MAX_BODY_SIZE: 1024m
GATEWAY_HOST: api-gateway
GATEWAY_PORT: 3002
MRV_SENDER_HOST: mrv-sender
MRV_SENDER_PORT: 3005
TOPIC_VIEWER_HOST: topic-viewer
TOPIC_VIEWER_PORT: 3006
ports:
- '127.0.0.1:3000:80'
init: true
worker-service:
build:
context: .
dockerfile: ./worker-service/Dockerfile
depends_on:
auth-service:
condition: service_started
ipfs-node:
condition: service_healthy
queue-service:
condition: service_started
volumes:
- ./worker-service/tls:/usr/local/app/worker-service/tls:ro
- ./worker-service/configs:/usr/local/app/worker-service/configs:ro
environment:
OPERATOR_ID: ${OPERATOR_ID}
OPERATOR_KEY: ${OPERATOR_KEY}
<<: *service-template
deploy:
replicas: 1
expose:
- '6555'
volumes:
ipfs_data:
ipfs_export: