-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
572 lines (570 loc) · 18.9 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
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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
---
services:
cassandra:
container_name: streamr-dev-cassandra
image: cassandra:3.11.5
init: true
networks:
- streamr-network
ports:
# - "7000:7000" # Conflicts with "Control Centre" service on MacOS. Cassandra uses it for cluster communication, which isn't necessary in a single-node cluster.
- "7001:7001"
- "7199:7199"
- "9042:9042"
- "9160:9160"
volumes:
- type: volume
source: data-cassandra
target: /var/lib/cassandra
volume:
nocopy: true
healthcheck:
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
interval: 5s
timeout: 10s
retries: 10
restart: unless-stopped
init-keyspace:
container_name: streamr-dev-init-keyspace
image: cassandra:3.11.5
init: true
networks:
- streamr-network
command: bash -c "sleep 5 && cqlsh cassandra -f /init_scripts/keyspace.cql && echo keyspace initialized"
restart: on-failure # exits on success
volumes:
- type: bind
source: ./cassandra_init_scripts
target: /init_scripts
read_only: true
bind:
propagation: rprivate
depends_on:
- cassandra
mysql:
container_name: streamr-dev-mysql
platform: linux/x86_64
image: mysql:5.7
init: true
networks:
- streamr-network
ports:
- "3306:3306"
volumes:
- type: volume
source: data-mysql
target: /var/lib/mysql
volume:
nocopy: true
- type: bind
source: ./custom-mysql-settings.cnf
target: /etc/mysql/conf.d/custom-mysql-settings.cnf
read_only: true
bind:
propagation: rprivate
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 10s
retries: 10
nginx:
container_name: streamr-dev-nginx
image: nginx:1.25.0
networks:
- streamr-network
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- type: bind
source: ./custom-nginx-reverse-proxy.conf
target: /etc/nginx/nginx.conf
read_only: true
bind:
propagation: rprivate
- type: bind
source: ./certs
target: /etc/nginx/mounted-certs
read_only: true
bind:
propagation: rprivate
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health_check"]
interval: 5s
timeout: 10s
retries: 10
entry-point:
container_name: streamr-dev-entry-point
image: streamr/node:dev
init: true
networks:
- streamr-network
restart: unless-stopped
ports:
- "40500:40500"
command: npm exec -c entry-point
healthcheck:
test: ["CMD", "curl", "http:/10.200.10.1:40500"]
interval: 1s
timeout: 5s
retries: 10
broker-node-storage-1:
container_name: streamr-dev-broker-node-storage-1
image: streamr/node:dev
init: true
networks:
- streamr-network
restart: unless-stopped
ports:
- "8890:8890"
- "8891:8891"
- "9000:9000"
- "40401:40401"
depends_on:
entry-point:
condition: service_healthy
cassandra:
condition: service_healthy
init-keyspace:
condition: service_completed_successfully
deploy-network-subgraphs-fastchain:
condition: service_completed_successfully
environment:
STREAMR_URL: "10.200.10.1"
CASSANDRA_HOST: 10.200.10.1:9042
command: npm exec -c "streamr-node configs/docker-1.env.json"
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost:8891/info"]
interval: 30s
timeout: 10s
retries: 20
broker-node-no-storage-1:
container_name: streamr-dev-broker-node-no-storage-1
image: streamr/node:dev
init: true
networks:
- streamr-network
restart: unless-stopped
ports:
- "8790:8790"
- "8791:8791"
- "9100:9100"
- "40402:40402"
depends_on:
entry-point:
condition: service_healthy
deploy-network-subgraphs-fastchain:
condition: service_completed_successfully
environment:
STREAMR_URL: "10.200.10.1"
command: npm exec -c "streamr-node configs/docker-2.env.json"
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost:8791/info"]
interval: 30s
timeout: 10s
retries: 20
broker-node-no-storage-2:
container_name: streamr-dev-broker-node-no-storage-2
image: streamr/node:dev
init: true
networks:
- streamr-network
restart: unless-stopped
ports:
- "8690:8690"
- "8691:8691"
- "9200:9200"
- "40403:40403"
depends_on:
entry-point:
condition: service_healthy
deploy-network-subgraphs-fastchain:
condition: service_completed_successfully
environment:
STREAMR_URL: "10.200.10.1"
command: npm exec -c "streamr-node configs/docker-3.env.json"
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost:8691/info"]
interval: 30s
timeout: 10s
retries: 20
platform:
container_name: streamr-dev-platform
image: streamr/platform:dev
networks:
- streamr-network
ports:
- "3333:80"
depends_on:
- parity-node0
environment:
DATA_UNIONS: "on"
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost"]
interval: 10s
timeout: 10s
retries: 60
network-explorer:
container_name: streamr-dev-network-explorer
image: streamr/network-explorer:dev
networks:
- streamr-network
ports:
- "3334:80"
depends_on:
- entry-point
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost"]
interval: 10s
timeout: 10s
retries: 60
parity-node0:
container_name: streamr-dev-parity-node0
environment:
CHAIN_ID: 0x2323
image: streamr/open-ethereum-poa-mainchain-preload1:dev
networks:
- streamr-network
ports:
- "8545:8540"
- "8450:8450"
- "30309:30309"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "--header", "Content-Type: application/json", "--data", '[{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}]', "http://localhost:8540/api/health"]
interval: 1m30s
timeout: 10s
retries: 3
command: --chain ./streamr-spec.json --config ./node0.toml
volumes:
- type: volume
source: data-parity-node0
target: /home/parity/parity_data
volume:
nocopy: true
parity-sidechain-node0:
container_name: streamr-dev-parity-sidechain-node0
environment:
CHAIN_ID: 0x2325
image: streamr/open-ethereum-poa-sidechain-preload1:dev
networks:
- streamr-network
ports:
- "8546:8540"
- "8451:8450"
- "30310:30309"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "--header", "Content-Type: application/json", "--data", '[{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}]', "http://localhost:8540/api/health"]
interval: 1m30s
timeout: 10s
retries: 3
command: --chain ./streamr-spec.json --config ./node0.toml
volumes:
- type: volume
source: data-parity-sidechain-node0
target: /home/parity/parity_data
volume:
nocopy: true
graph-node:
container_name: streamr-dev-thegraph-node
image: graphprotocol/graph-node:v0.30.0
restart: unless-stopped
networks:
- streamr-network
ports:
- '8000:8000'
- '8001:8001'
- '8020:8020'
- '8030:8030'
- '8040:8040'
depends_on:
- ipfs
- postgres
- parity-sidechain-node0
environment:
postgres_host: postgres
postgres_user: streamr
postgres_pass: let-me-in
postgres_db: streamr
ipfs: 'streamr-dev-ipfs:5001'
ethereum: 'xDai:http://streamr-dev-parity-sidechain-node0:8540'
RUST_LOG: info
GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH: "true"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "8000"]
interval: 5s
timeout: 10s
retries: 10
graph-deploy-streamregistry-subgraph:
container_name: streamr-dev-graph-deploy-streamregistry-subgraph
image: streamr/graph-deploy-streamregistry-subgraph:dev
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node
volumes:
- type: volume
source: data-graph-deploy-legacy
target: /firstrun
volume:
nocopy: false
deploy-network-subgraphs:
container_name: streamr-dev-deploy-network-subgraphs
image: streamr/deploy-network-subgraphs:dev
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node
volumes:
- type: volume
source: data-graph-deploy
target: /firstrun
volume:
nocopy: false
deploy-hub-subgraph:
container_name: streamr-dev-deploy-hub-subgraph
image: streamr/deploy-hub-subgraph:dev
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node
volumes:
- type: volume
source: data-deploy-hub-subgraph
target: /firstrun
volume:
nocopy: false
graph-deploy-dataunion-subgraph:
container_name: streamr-dev-graph-deploy-dataunion-subgraph
image: streamr/graph-deploy-dataunion-subgraph:dev
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node
volumes:
- type: volume
source: data-graph-deploy-dataunion
target: /firstrun
volume:
nocopy: false
graph-deploy-dataunion-subgraph-fastchain:
container_name: streamr-dev-graph-deploy-dataunion-subgraph-fastchain
image: streamr/graph-deploy-dataunion-subgraph:dev-fastchain
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node-fastchain
volumes:
- type: volume
source: data-graph-deploy-dataunion-fastchain
target: /firstrun
volume:
nocopy: false
graph-deploy-tatum-subgraph:
container_name: streamr-dev-graph-deploy-tatum-subgraph
image: streamr/graph-deploy-tatum-subgraph:dev
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node
volumes:
- type: volume
source: data-graph-deploy-tatum
target: /firstrun
volume:
nocopy: false
ipfs:
container_name: streamr-dev-ipfs
image: ipfs/kubo:v0.22.0
networks:
- streamr-network
ports:
- '5001:5001'
- '6695:8080'
volumes:
- type: volume
source: data-ipfs
target: /data/ipfs
volume:
nocopy: true
environment:
IPFS_PROFILE: server # sets the server profile
healthcheck:
test: ["CMD-SHELL", "ipfs --api=/ip4/127.0.0.1/tcp/5001 dag stat /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn || exit 1"] # from official image
interval: 10s
timeout: 3s
retries: 10
dev-chain-fast:
container_name: streamr-dev-chain-fast
image: streamr/dev-chain-fast:dev
networks:
- streamr-network
ports:
- "8547:8545"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "--header", "Content-Type: application/json", "--data", '[{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1},{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}]', "http://localhost:8545/api/health"]
interval: 1m30s
timeout: 10s
retries: 3
graph-node-fastchain:
container_name: streamr-dev-thegraph-node-fastchain
image: graphprotocol/graph-node:v0.32.0
restart: unless-stopped
networks:
- streamr-network
ports:
- '8800:8000'
# - '8001:8001'
- '8820:8020'
# - '8030:8030'
# - '8040:8040'
depends_on:
- ipfs
- postgres-fastchain
- dev-chain-fast
environment:
postgres_host: postgres-fastchain
postgres_user: streamr
postgres_pass: let-me-in
postgres_db: streamr
ipfs: 'streamr-dev-ipfs:5001'
ethereum: 'xDai:http://streamr-dev-chain-fast:8545'
RUST_LOG: info
GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH: "true"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "8000"]
interval: 5s
timeout: 10s
retries: 10
deploy-network-subgraphs-fastchain:
container_name: streamr-dev-deploy-network-subgraphs-fastchain
image: streamr/deploy-network-subgraphs:dev-fastchain
restart: on-failure # exits on success
networks:
- streamr-network
depends_on:
- graph-node-fastchain
volumes:
- type: volume
source: data-graph-deploy-fastchain
target: /firstrun
volume:
nocopy: false
postgres-fastchain:
container_name: streamr-dev-postgres-fastchain
image: postgres
restart: unless-stopped
networks:
- streamr-network
# ports:
# - '5432:5432'
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: streamr
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: streamr
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
volumes:
- type: volume
source: data-postgres-fastchain
target: /var/lib/postgresql/data
volume:
nocopy: true
healthcheck:
test: ["CMD-SHELL", "pg_isready -U streamr -d streamr"]
interval: 5s
timeout: 10s
retries: 10
postgres:
container_name: streamr-dev-postgres
image: postgres
restart: unless-stopped
networks:
- streamr-network
ports:
- '5432:5432'
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: streamr
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: streamr
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
volumes:
- type: volume
source: data-postgres
target: /var/lib/postgresql/data
volume:
nocopy: true
healthcheck:
test: ["CMD-SHELL", "pg_isready -U streamr -d streamr"]
interval: 5s
timeout: 10s
retries: 10
stream-metrics-index:
container_name: streamr-dev-stream-metrics-index
image: streamr/stream-metrics-index
networks:
- streamr-network
restart: unless-stopped
ports:
- "4001:4001"
depends_on:
- mysql
- graph-deploy-streamregistry-subgraph
- entry-point
ens-sync-script:
container_name: ens-sync-script
image: streamr/ens-sync-script:dev
networks:
- streamr-network
depends_on:
- parity-node0
- parity-sidechain-node0
healthcheck:
test: ["CMD", "echo"] # TODO: health check
interval: 10s
timeout: 10s
retries: 60
ens-sync-script-fastchain:
container_name: ens-sync-script-fastchain
image: streamr/ens-sync-script:dev-fastchain
networks:
- streamr-network
depends_on:
- dev-chain-fast
healthcheck:
test: ["CMD", "/home/node/app/script/healthcheck.sh"]
interval: 10s
timeout: 10s
retries: 60
networks:
streamr-network:
driver: bridge
volumes:
cassandra_init_scripts:
data-mysql:
data-cassandra:
data-parity-node0:
data-parity-sidechain-node0:
data-ipfs:
data-postgres:
data-postgres-fastchain:
data-graph-deploy:
data-graph-deploy-fastchain:
data-graph-deploy-legacy:
data-deploy-hub-subgraph:
data-graph-deploy-dataunion:
data-graph-deploy-dataunion-fastchain:
data-graph-deploy-tatum: