forked from Consensys/orchestrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
294 lines (272 loc) · 7.68 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
version: "3.7"
x-default-variables: &default-variables
API_URL: ${API_URL-http://api:8081}
API_METRICS_URL: ${API_METRICS_URL-http://api:8082}
TX_SENDER_METRICS_URL: ${TX_SENDER_METRICS_URL-http://tx-sender:8082}
TX_LISTENER_METRICS_URL: ${TX_LISTENER_METRICS_URL-http://tx-listener:8082}
KEY_MANAGER_URL: ${KEY_MANAGER_URL-https://quorum-key-manager:8080}
KEY_MANAGER_METRICS_URL: ${KEY_MANAGER_URL-https://quorum-key-manager:8081}
KEY_MANAGER_STORE_NAME: ${KEY_MANAGER_STORE_NAME-}
KEY_MANAGER_TLS_SKIP_VERIFY: ${KEY_MANAGER_TLS_SKIP_VERIFY-}
KEY_MANAGER_API_KEY: ${KEY_MANAGER_API_KEY-}
KEY_MANAGER_CLIENT_TLS_CERT: ${KEY_MANAGER_CLIENT_TLS_CERT-}
KEY_MANAGER_CLIENT_TLS_KEY: ${KEY_MANAGER_CLIENT_TLS_KEY-}
ETH_CLIENT_RETRY_MAX_ELAPSED_TIME: 5s
LOG_LEVEL: ${LOG_LEVEL-debug}
LOG_FORMAT: ${LOG_FORMAT-}
LOG_TIMESTAMP: ${LOG_TIMESTAMP-true}
MULTI_TENANCY_ENABLED: ${MULTI_TENANCY_ENABLED-false}
KAFKA_URL: ${KAFKA_URL-kafka:29092}
KAFKA_SASL_ENABLED: ${KAFKA_SASL_ENABLED-false}
KAFKA_SASL_MECHANISM: ${KAFKA_SASL_MECHANISM-PLAIN}
KAFKA_SASL_USER: ${KAFKA_SASL_USER-}
KAFKA_SASL_PASSWORD: ${KAFKA_SASL_PASSWORD-}
KAFKA_TLS_ENABLED: ${KAFKA_TLS_ENABLED-false}
KAFKA_TLS_INSECURE_SKIP_VERIFY: ${KAFKA_TLS_INSECURE_SKIP_VERIFY-false}
KAFKA_NUM_CONSUMERS: ${KAFKA_NUM_CONSUMERS-}
METRICS_MODULES: ${METRICS_MODULES-}
x-container-common: &container-common
restart: ${CONTAINER_RESTART-on-failure}
image: consensys/orchestrate:v21.12.7
networks:
- orchestrate
- deps
x-db-common: &db-common
DB_TLS_SSLMODE: ${DB_TLS_SSLMODE-}
DB_TLS_CERT: ${DB_TLS_CERT-}
DB_TLS_KEY: ${DB_TLS_KEY-}
DB_TLS_CA: ${DB_TLS_CA-}
DB_HOST: ${DB_HOST-postgres}
DB_PORT: ${DB_PORT-}
DB_DATABASE: ${DB_DATABASE-}
DB_POOLSIZE: ${DB_POOLSIZE-}
DB_POOL_TIMEOUT: ${DB_POOL_TIMEOUT-}
x-api-common: &api-common
PROXY_MAXIDLECONNSPERHOST: ${PROXY_MAXIDLECONNSPERHOST-}
PROXY_CACHE_TTL: ${PROXY_CACHE_TTL-}
AUTH_API_KEY: ${AUTH_API_KEY-}
AUTH_JWT_ISSUER_URL: ${AUTH_JWT_ISSUER_URL-}
AUTH_JWT_AUDIENCE: ${AUTH_JWT_AUDIENCE-}
AUTH_JWT_ORCHESTRATE_CLAIMS: ${AUTH_JWT_ORCHESTRATE_CLAIMS-}
ACCESSLOG_ENABLED: ${ACCESSLOG_ENABLED-false}
x-tx-listener-common: &tx-listener-common
API_CACHE_TTL: ${API_CACHE_TTL-}
x-tx-sender-common: &tx-sender-common
NONCE_MANAGER_TYPE: ${NONCE_MANAGER_TYPE-redis}
REDIS_HOST: ${REDIS_HOST-redis}
REDIS_PORT: ${REDIS_PORT-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD-}
REDIS_DATABASE: ${REDIS_DATABASE-}
REDIS_TLS_ENABLE: ${REDIS_TLS_ENABLE-}
REDIS_TLS_CERT: ${REDIS_TLS_CERT-}
REDIS_TLS_KEY: ${REDIS_TLS_KEY-}
REDIS_TLS_CA: ${REDIS_TLS_CA-}
REDIS_EXPIRATION: ${REDIS_EXPIRATION-}
REDIS_TLS_SKIP_VERIFY: ${REDIS_TLS_SKIP_VERIFY-}
services:
vault:
<<: *container-common
image: consensys/quorum-hashicorp-vault-plugin:v1.1.4
tty: true
restart: "no"
cap_add:
- IPC_LOCK
environment:
VAULT_DEV_ROOT_TOKEN_ID: ${VAULT_TOKEN-DevVaultToken}
VAULT_ADDR: http://vault:8200
PLUGIN_MOUNT_PATH: quorum
PLUGIN_PATH: /vault/plugins
entrypoint:
- sh
- -c
- |
( sleep 2 ; vault-init-dev.sh ) &
vault server -dev -dev-plugin-dir=/vault/plugins -dev-listen-address="0.0.0.0:8200"
ports:
- 8200:8200
healthcheck:
test: [ "CMD", "wget", "--spider", "--proxy", "off", "http://vault:8200/v1/sys/health?standbyok=true" ]
interval: 10s
timeout: 3s
retries: 10
start_period: 5s
zookeeper:
image: confluentinc/cp-zookeeper:5.4.3
ports:
- ${ZOOKEEPER_EXTERNAL_PORT-2181}:2181
restart: "on-failure"
networks:
- deps
environment:
ZOOKEEPER_CLIENT_PORT: ${ZOOKEEPER_CLIENT_PORT-32181}
ZOOKEEPER_TICK_TIME: ${ZOOKEEPER_TICK_TIME-2000}
kafka:
image: confluentinc/cp-kafka:5.4.3
depends_on:
- zookeeper
ports:
- ${KAFKA_EXTERNAL_PORT-9092}:9092
restart: "on-failure"
networks:
- deps
environment:
KAFKA_BROKER_ID: 1
KAFKA_NUM_PARTITIONS: ${KAFKA_NUM_PARTITIONS-3}
KAFKA_ZOOKEEPER_CONNECT: zookeeper:${ZOOKEEPER_CLIENT_PORT-32181}
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://${KAFKA_EXTERNAL_HOSTNAME-localhost}:${KAFKA_EXTERNAL_PORT-9092}
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
healthcheck:
test: ["CMD", "kafka-topics", "--list", "--bootstrap-server", "kafka:9092"]
interval: 3s
timeout: 3s
retries: 10
start_period: 5s
postgres:
image: postgres:13.4-alpine
environment:
POSTGRES_PASSWORD: postgres
volumes:
- db-data-api:/var/lib/postgresql/data
ports:
- 5432
networks:
- deps
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 1s
timeout: 1s
retries: 5
restart: "on-failure"
key-manager-init:
image: gcr.io/distroless/static:debug
volumes:
- manifests:/manifests
entrypoint:
- sh
- -c
- |
cat <<EOF > /manifests/default.yml
- kind: Vault
type: hashicorp
name: hashicorp-quorum
specs:
mount_point: quorum
address: http://vault:8200
token: DevVaultToken
namespace: ''
- kind: Store
type: key
name: orchestrate-keystore
specs:
vault: hashicorp-quorum
- kind: Store
type: ethereum
name: orchestrate-eth
specs:
key_store: orchestrate-keystore
EOF
key-manager-migration:
image: consensys/quorum-key-manager:v21.12.5
environment:
<<: *default-variables
<<: *db-common
command: migrate up
restart: "on-failure"
networks:
- deps
depends_on:
- postgres
key-manager:
image: consensys/quorum-key-manager:v21.12.5
environment:
<<: *default-variables
<<: *db-common
MANIFEST_PATH: ${MANIFEST_PATH-/manifests}
ports:
- 8080:8080
- 8081:8081
depends_on:
- vault
- key-manager-init
- key-manager-migration
- postgres
networks:
- deps
restart: "on-failure"
command: run
volumes:
- manifests:/manifests
api-migration-init:
<<: *container-common
environment:
<<: *default-variables
<<: *db-common
restart: "on-failure"
depends_on:
- postgres
command: api migrate init
api-migration:
<<: *container-common
environment:
<<: *default-variables
<<: *db-common
restart: "on-failure"
depends_on:
- api-migration-init
- postgres
command: api migrate up
api:
<<: *container-common
ports:
- 8031:8081
- 8032:8082
environment:
<<: *default-variables
<<: *db-common
<<: *api-common
depends_on:
- api-migration
- key-manager
- kafka
restart: "on-failure"
command: api run
labels:
filebeat: "false"
tx-sender:
<<: *container-common
ports:
- 8062:8082
environment:
<<: *default-variables
<<: *tx-sender-common
restart: "on-failure"
depends_on:
- api
- postgres
- kafka
command: tx-sender run
tx-listener:
ports:
- 8082:8082
<<: *container-common
environment:
<<: *default-variables
<<: *tx-listener-common
restart: "on-failure"
depends_on:
- api
- kafka
- postgres
command: tx-listener run
networks:
orchestrate:
name: orchestrate
deps:
name: deps_orchestrate
volumes:
db-data-api:
driver: local
manifests:
driver: local