-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
93 lines (89 loc) · 3.43 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
version: '3'
services:
postgres:
build:
context: .
dockerfile: ./docker/pg-Dockerfile
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
subquery-node:
build:
context: .
dockerfile: ./docker/sq-Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
'postgres':
condition: service_healthy
restart: always
environment:
DB_USER: postgres
DB_PASS: postgres
DB_DATABASE: postgres
DB_HOST: postgres
DB_PORT: 5432
START_BLOCK: 1
# Polymesh-local
NETWORK_ENDPOINT: ws://host.docker.internal:9944
# Setting NETWORK_HTTP_ENDPOINT will allow dynamic lookup of NETWORK_CHAIN_ID
NETWORK_HTTP_ENDPOINT: 'http://host.docker.internal:9933'
# Staging
# NETWORK_ENDPOINT: wss://staging-rpc.polymesh.dev/
# NETWORK_CHAIN_ID: '0x3c3183f6d701500766ff7d147b79c4f10014a095eaaa98e960dcef6b3ead50ee'
# NETWORK_DICTIONARY: https://subql-dictionary.polymesh.dev
# Testnet
# NETWORK_ENDPOINT: wss://testnet-rpc.polymesh.live
# NETWORK_CHAIN_ID: '0x2ace05e703aa50b48c0ccccfc8b424f7aab9a1e2c424ed12e45d20b1e8ffd0d6'
# NETWORK_DICTIONARY: https://testnet-subql-dictionary.polymesh.live/
# Mainnet
# NETWORK_ENDPOINT: wss://mainnet-rpc.polymesh.network
# NETWORK_CHAIN_ID: '0x6fbd74e5e1d0a61d52ccfe9d4adaed16dd3a7caa37c6bc4d0c2fa12e8b2f4063'
# NETWORK_DICTIONARY: https://mainnet-subql-dictionary.polymesh.network/
command:
- -f=/app # Path of the project
- --batch-size=50 # Batch size of blocks to fetch in one round
# - --scale-batch-size # scale batch size based on memory usage. To know more about the process - https://github.com/subquery/subql/blob/c9bc9733deef726f78fa48387e74e52f8d6ca8d2/packages/node/src/indexer/fetch.service.ts#L88
# - --timeout=3600 # Timeout for indexer sandbox to execute the mapping functions (in seconds)
# - --local # This is now deprecated
# - --force-clean # To remove all tables and schema before starting the app
# - --workers=4 # Number of available CPU cores strictly limits the usage of worker threads. Read more here - https://academy.subquery.network/run_publish/references.html#w-workers
# - --log-level=debug
- --store-flush-interval=0 ## this is only needed for tests to run without any cache. Comment this out if using for production instance
# - --disable-historical=false # Enable/disable automated historical state tracking (by default it is false). Read more here - https://academy.subquery.network/indexer/run_publish/historical.html
healthcheck:
test: ['CMD', 'curl', '-f', 'http://subquery-node:3000/ready']
interval: 3s
timeout: 5s
retries: 20
start_period: 30s
graphql-engine:
image: onfinality/subql-query:v2.8.0
ports:
- 3001:3000
depends_on:
'postgres':
condition: service_healthy
'subquery-node':
condition: service_healthy
restart: always
environment:
DB_USER: postgres
DB_PASS: postgres
DB_DATABASE: postgres
DB_HOST: postgres
DB_PORT: 5432
command:
- --name=public
- --playground
- --indexer=http://subquery-node:3000
volumes:
db-data: