-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
330 lines (318 loc) · 7.82 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
volumes:
subqlDb:
blenderDb:
services:
subql-builder:
image: node:18-alpine
user: node:node
profiles:
- subql
- subql-cfg
- subql-eth
volumes:
- ./centrifuge-subql:/app
working_dir: /app
entrypoint: []
environment:
ONFINALITY_API_KEY: ${ONFINALITY_API_KEY}
command:
- sh
- -c
- "CHAIN_ID=centrifuge yarn projectgen && yarn codegen && yarn build:dev"
subql-config:
image: node:18-alpine
user: node:node
profiles:
- subql
- subql-cfg
- subql-eth
volumes:
- ./centrifuge-subql:/app
working_dir: /app
environment:
CHAIN_ID: ${CHAIN_ID}
ONFINALITY_API_KEY: ${ONFINALITY_API_KEY}
command:
- sh
- -c
- "yarn projectgen"
depends_on:
subql-builder:
condition: service_completed_successfully
subql-db:
build:
context: ./centrifuge-subql/
dockerfile: docker/pg-Dockerfile
profiles:
- subql
- subql-cfg
- subql-eth
ports:
- 5432:5432
volumes:
- subqlDb:/var/lib/postgresql/data
- ./postgres:/docker-entrypoint-initdb.d
environment:
POSTGRES_DB: postgres
POSTGRES_USER: ${SUBQL_DB_USER}
POSTGRES_PASSWORD: ${SUBQL_DB_PASS}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
subql-node-cfg:
image: onfinality/subql-node:latest
profiles:
- subql
- subql-cfg
- subql-eth
depends_on:
subql-db:
condition: service_healthy
subql-builder:
condition: service_completed_successfully
subql-config:
condition: service_completed_successfully
restart: always
environment:
TZ: UTC
DB_USER: ${SUBQL_DB_USER}
DB_PASS: ${SUBQL_DB_PASS}
DB_DATABASE: postgres
DB_HOST: subql-db
DB_PORT: 5432
volumes:
- ./centrifuge-subql:/app
command:
- -f=/app/project-centrifuge.yaml
- --multi-chain
- --db-schema=app
- --disable-historical=true
- --batchSize=100
- --unsafe
- --workers=0
#- --debug="SQL"
healthcheck:
test: ["CMD", "curl", "-f", "http://subql-node-cfg:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
subql-node-eth:
image: onfinality/subql-node-ethereum:latest
profiles:
- subql
- subql-eth
depends_on:
subql-db:
condition: service_healthy
subql-builder:
condition: service_completed_successfully
subql-config:
condition: service_completed_successfully
restart: always
environment:
TZ: UTC
DB_USER: ${SUBQL_DB_USER}
DB_PASS: ${SUBQL_DB_PASS}
DB_DATABASE: postgres
DB_HOST: subql-db
DB_PORT: 5432
volumes:
- ./centrifuge-subql:/app
command:
- --timeout=3600
- -f=/app/project-eth.yaml
- --multi-chain
- --db-schema=app
- --disable-historical=true
- --workers=0
- --batch-size=30
- --skipTransactions=true
- --unsafe
#- --debug
healthcheck:
test: ["CMD", "curl", "-f", "http://subql-node-eth:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
subql-node-base:
image: onfinality/subql-node-ethereum:latest
profiles:
- subql
depends_on:
subql-db:
condition: service_healthy
subql-builder:
condition: service_completed_successfully
subql-config:
condition: service_completed_successfully
restart: always
environment:
TZ: UTC
DB_USER: ${SUBQL_DB_USER}
DB_PASS: ${SUBQL_DB_PASS}
DB_DATABASE: postgres
DB_HOST: subql-db
DB_PORT: 5432
volumes:
- ./centrifuge-subql:/app
command:
- -f=/app/project-base.yaml
- --multi-chain
- --db-schema=app
- --disable-historical=true
- --workers=0
- --batch-size=30
- --skipTransactions=true
- --unsafe
#- --debug
healthcheck:
test: ["CMD", "curl", "-f", "http://subql-node-base:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
subql-node-celo:
image: onfinality/subql-node-ethereum:latest
profiles:
- none
depends_on:
subql-db:
condition: service_healthy
subql-builder:
condition: service_completed_successfully
subql-config:
condition: service_completed_successfully
restart: always
environment:
TZ: UTC
DB_USER: ${SUBQL_DB_USER}
DB_PASS: ${SUBQL_DB_PASS}
DB_DATABASE: postgres
DB_HOST: subql-db
DB_PORT: 5432
volumes:
- ./centrifuge-subql:/app
command:
- -f=/app/project-celo.yaml
- --multi-chain
- --db-schema=app
- --disable-historical=true
- --workers=0
- --batch-size=30
- --skipTransactions=true
- --unsafe
#- --debug
healthcheck:
test: ["CMD", "curl", "-f", "http://subql-node-celo:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
subql-query:
image: onfinality/subql-query:latest
profiles:
- subql
- subql-cfg
- subql-eth
ports:
- 3000:3000
depends_on:
subql-db:
condition: service_healthy
restart: always
environment:
TZ: UTC
DB_USER: ${SUBQL_DB_USER}
DB_PASS: ${SUBQL_DB_PASS}
DB_DATABASE: postgres
DB_HOST: subql-db
DB_PORT: 5432
command:
- --name=app
- --playground
- --aggregate
- --indexer=http://subql-node-cfg:3000
- --query-limit=1000
insights-client:
image: centrifuge-insights
profiles:
- insights
build:
context: centrifuge-insights
dockerfile: Dockerfile
target: install
volumes:
- ./centrifuge-insights:/usr/src/app
- /usr/src/app/node_modules
ports:
- 8010:8010
environment:
# make hot-reloading work.
- CHOKIDAR_USEPOLLING=true # maybe obsolete?
- WDS_SOCKET_PORT=0
# run node in development mode
- NODE_ENV=development
# set ops env to local
- REACT_APP_OPS_ENV=local
- PORT=8010
command: yarn start
blender-db:
image: mongo
profiles:
- blender
volumes:
- blenderDb:/data/db
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: ${BLENDER_DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${BLENDER_DB_PASS}
MONGO_INITDB_DATABASE: blender
blender-influx:
image: centrifuge-influx
profiles:
- blender
build:
context: ./centrifuge-influx
dockerfile: Dockerfile
target: install
volumes:
- ./centrifuge-influx:/usr/src/app
- /usr/src/app/node_modules
user: node:node
ports:
- 5011:5000
depends_on:
- blender-db
environment:
DB_URI: "mongodb://${BLENDER_DB_USER}:${BLENDER_DB_PASS}@blender-db:27017/blender?authSource=admin"
POOL_ID: ${POOL_ID}
PROXY_KEYRING_URI: ${PROXY_KEYRING_URI}
OPERATOR_ADDRESS: ${OPERATOR_ADDRESS}
tty: true # makes the service logs colorful
command: yarn develop
blender-outflux:
image: centrifuge-outflux
profiles:
- blender
build:
context: ./centrifuge-outflux
dockerfile: Dockerfile
target: install
volumes:
- ./centrifuge-outflux:/usr/src/app
- /usr/src/app/node_modules
ports:
- 5010:5000
- 9229:9229
user: node:node
depends_on:
- blender-db
environment:
DB_URI: "mongodb://${BLENDER_DB_USER}:${BLENDER_DB_PASS}@blender-db:27017/blender?authSource=admin"
LOGGER_LEVEL: debug
API_KEY: supersecret
# set SUBQL_ENDPOINT url to merge subquery graph into outflux graph
# SUBQL_ENDPOINT: "https://api.subquery.network/sq/centrifuge/pools-demo-multichain"
tty: true # makes the service logs colorful
command: yarn develop:debug