-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
334 lines (332 loc) · 11 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
---
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
image: mysql:9.1.0
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
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
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
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
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: 10s
timeout: 1s
retries: 10
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
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
- deploy-network-subgraphs-fastchain
- entry-point
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-ipfs:
data-postgres-fastchain:
data-graph-deploy-fastchain:
data-graph-deploy-dataunion-fastchain: