forked from StakeSquid/graphprotocol-mainnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose-indexer.yml
213 lines (191 loc) · 9.01 KB
/
compose-indexer.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
version: '3.7'
networks:
monitor-net:
driver: bridge
volumes:
postgres2_data: {}
subgraph_radio_data: {}
services:
######################################################################################
##################### CLI CONTAINER #######################
######################################################################################
cli:
build:
context: ./cli
container_name: cli
restart: unless-stopped
environment:
GEO_COORDINATES: ${GEO_COORDINATES:-69.42069 69.42069}
tty: true
networks:
- monitor-net
volumes:
- ./cli/scripts:/home/graph/scripts
- ./cli/history:/history
######################################################################################
##################### INDEXER SERVICE CONTAINER #######################
######################################################################################
indexer-service:
image: ${INDEXER_SERVICE_VERSION:-ghcr.io/graphprotocol/indexer-service:v0.20.22}
container_name: indexer-service
depends_on:
- postgres2
environment:
INDEXER_SERVICE_MNEMONIC: ${OPERATOR_SEED_PHRASE}
INDEXER_SERVICE_INDEXER_ADDRESS: ${STAKING_WALLET_ADDRESS}
INDEXER_SERVICE_PORT: 7600
INDEXER_SERVICE_ETHEREUM_NETWORK: arbitrum
INDEXER_SERVICE_ETHEREUM: ${TXN_RPC}
INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT: http://query-node-0:8000
INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT: http://index-node-0:8030/graphql
INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT: ${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT:-https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum}
INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT: ${NETWORK_SUBGRAPH_DEPLOYMENT}
INDEXER_SERVICE_POSTGRES_HOST: postgres2
INDEXER_SERVICE_POSTGRES_USERNAME: ${DB_USER:-graph-node}
INDEXER_SERVICE_POSTGRES_PASSWORD: ${DB_PASS:-db-password}
INDEXER_SERVICE_POSTGRES_DATABASE: ${AGENT_DB_NAME:-indexer-agent}
INDEXER_SERVICE_CLIENT_SIGNER_ADDRESS: "0xc483960d4D58eabc434Dc88a620AdFd883D6Dd4e"
expose:
- 7300
- 7600
networks:
- monitor-net
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.services.indexer-service-mainnet.loadbalancer.server.port=7600"
- "traefik.http.routers.indexer-service-mainnet.entrypoints=websecure"
- "traefik.http.routers.indexer-service-mainnet.tls.certresolver=myresolver"
- "traefik.http.routers.indexer-service-mainnet.rule=Host(`$INDEX_HOST`)"
######################################################################################
##################### INDEXER AGENT CONTAINER #######################
######################################################################################
indexer-agent:
image: ${INDEXER_AGENT_VERSION:-ghcr.io/graphprotocol/indexer-agent:v0.20.22}
container_name: indexer-agent
depends_on:
- postgres2
expose:
- 7300
- 8000
- 8001
- 8002
volumes:
- ./indexer-agent-configs:/root/indexer-agent-configs/
environment:
INDEXER_AGENT_MULTINETWORK_MODE: ${INDEXER_AGENT_MULTINETWORK_MODE:-false}
INDEXER_AGENT_NETWORK_SPECIFICATIONS_DIRECTORY: /root/indexer-agent-configs/
INDEXER_AGENT_MNEMONIC: ${OPERATOR_SEED_PHRASE}
INDEXER_AGENT_INDEXER_ADDRESS: ${STAKING_WALLET_ADDRESS}
INDEXER_AGENT_INDEX_NODE_IDS: "index_node_0"
INDEXER_AGENT_INJECT_DAI: "true"
INDEXER_AGENT_REBATE_CLAIM_THRESHOLD: ${REBATE_CLAIM_THRESHOLD:-200}
INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD: ${REBATE_CLAIM_BATCH_THRESHOLD:-2000}
INDEXER_AGENT_REBATE_CLAIM_MAX_BATCH_SIZE: ${REBATE_CLAIM_MAX_BATCH_SIZE:-100}
INDEXER_AGENT_VOUCHER_REDEMPTION_THRESHOLD: ${VOUCHER_REDEMPTION_THRESHOLD:-200}
INDEXER_AGENT_VOUCHER_REDEMPTION_BATCH_THRESHOLD: ${VOUCHER_REDEMPTION_BATCH_THRESHOLD:-2000}
INDEXER_AGENT_VOUCHER_REDEMPTION_MAX_BATCH_SIZE: ${VOUCHER_REDEMPTION_MAX_BATCH_SIZE:-100}
INDEXER_AGENT_ETHEREUM_NETWORK: arbitrum
INDEXER_AGENT_ETHEREUM: ${TXN_RPC}
INDEXER_AGENT_GRAPH_NODE_QUERY_ENDPOINT: http://query-node-0:8000
INDEXER_AGENT_GRAPH_NODE_STATUS_ENDPOINT: http://index-node-0:8030/graphql
INDEXER_AGENT_GRAPH_NODE_ADMIN_ENDPOINT: http://index-node-0:8020
INDEXER_AGENT_PUBLIC_INDEXER_URL: 'https://${INDEX_HOST}/'
INDEXER_AGENT_INDEXER_GEO_COORDINATES: ${GEO_COORDINATES:-69.420 69.420}
INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT: ${INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT:-https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum}
INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT: ${NETWORK_SUBGRAPH_DEPLOYMENT}
INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT: ${INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT:-https://api.thegraph.com/subgraphs/name/graphprotocol/arbitrum-epoch-block-oracle}
INDEXER_AGENT_POSTGRES_HOST: ${AGENT_DB_HOST:-postgres2}
INDEXER_AGENT_POSTGRES_USERNAME: ${DB_USER:-graph-node}
INDEXER_AGENT_POSTGRES_PASSWORD: ${DB_PASS:-db-password}
INDEXER_AGENT_POSTGRES_DATABASE: ${AGENT_DB_NAME:-indexer-agent}
INDEXER_AGENT_DAI_CONTRACT: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
INDEXER_AGENT_COLLECT_RECEIPTS_ENDPOINT: https://gateway.thegraph.com/collect-receipts
INDEXER_AGENT_OFFCHAIN_SUBGRAPHS: ${INDEXER_AGENT_OFFCHAIN_SUBGRAPHS}
INDEXER_AGENT_GAS_PRICE_MAX: ${INDEXER_AGENT_GAS_PRICE_MAX:-50}
INDEXER_AGENT_ALLOCATION_MANAGEMENT: ${INDEXER_AGENT_ALLOCATION_MANAGEMENT:-auto}
INDEXER_AGENT_SUBGRAPH_MAX_BLOCK_DISTANCE: 1000
networks:
- monitor-net
restart: unless-stopped
######################################################################################
##################### POSTGRES AGENT CONTAINER #######################
######################################################################################
postgres2:
image: ${POSTGRES_AGENT_VERSION:-postgres:16.1}
container_name: postgres2
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-graph-node}
POSTGRES_PASSWORD: ${DB_PASS:-db-password}
POSTGRES_DB: ${AGENT_DB_NAME:-indexer-agent}
volumes:
- postgres2_data:/var/lib/postgresql/data
networks:
- monitor-net
expose:
- 5432
######################################################################################
##################### SUBGRAPH RADIO CONTAINER ##################
######################################################################################
subgraph-radio:
image: ghcr.io/graphops/subgraph-radio:1.0
container_name: subgraph-radio
expose:
- 3010
- 3012
restart: unless-stopped
environment:
GRAPHCAST_NETWORK: ${GRAPHCAST_NETWORK:-mainnet}
REGISTRY_SUBGRAPH: ${REGISTRY_SUBGRAPH:-https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet}
NETWORK_SUBGRAPH: ${NETWORK_SUBGRAPH:-https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum}
MNEMONIC: ${OPERATOR_SEED_PHRASE}
GRAPH_NODE_STATUS_ENDPOINT: ${GRAPH_NODE_STATUS_ENDPOINT:-http://index-node-0:8030/graphql}
RUST_LOG: ${RUST_LOG:-warn,hyper=warn,graphcast_sdk=info,subgraph_radio=info}
INDEXER_ADDRESS: ${STAKING_WALLET_ADDRESS}
METRICS_HOST: ${METRICS_HOST:-0.0.0.0}
METRICS_PORT: ${METRICS_PORT:-3010}
SERVER_PORT: ${SERVER_PORT:-3012}
ID_VALIDATION: ${ID_VALIDATION:-indexer}
GOSSIP_TOPIC_COVERAGE: ${COVERAGE:-comprehensive}
SQLITE_FILE_PATH: ${SQLITE_FILE_PATH:-/data/state.sqlite}
volumes:
- subgraph_radio_data:/data
networks:
- monitor-net
######################################################################################
##################### TRAEFIK PROXY CONTAINER #######################
######################################################################################
traefik:
image: traefik:latest
container_name: traefik
restart: always
expose:
- "8082"
ports:
- "443:443"
- "80:80"
command:
- "--api=true"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/dynamic_config.yml"
- "--entrypoints.websecure.address=:443"
- "--entryPoints.metrics.address=:8082"
- "--metrics.prometheus.entryPoint=metrics"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
# TESTING
- "--certificatesresolvers.myresolver.acme.email=$EMAIL"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
volumes:
- "./traefik/letsencrypt:/letsencrypt"
- "./traefik/config/dynamic_config.yml:/dynamic_config.yml"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- monitor-net
labels:
- "traefik.enable=true"