-
Notifications
You must be signed in to change notification settings - Fork 65
/
compose-indexer.yml
254 lines (231 loc) · 10.9 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
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
networks:
monitor-net:
driver: bridge
volumes:
postgres-agent_data: {}
subgraph-radio_data: {}
x-indexer-environment: &indexer-environment
INDEXER_INDEXER__INDEXER_ADDRESS: ${STAKING_WALLET_ADDRESS}
INDEXER_INDEXER__OPERATOR_MNEMONIC: ${OPERATOR_SEED_PHRASE}
INDEXER_METRICS__PORT: 7300
INDEXER_DATABASE__POSTGRES_URL: "postgres://${AGENT_DB_USER}:${AGENT_DB_PASS}@${AGENT_DB_HOST}:5432/${AGENT_DB_NAME}"
INDEXER_GRAPH_NODE__QUERY_URL: "http://query-node-0:8000"
INDEXER_GRAPH_NODE__STATUS_URL: "http://index-node-0:8030/graphql"
# Subgraphs - Network Configuration
INDEXER_SUBGRAPHS__NETWORK__QUERY_URL: ${NETWORK_SUBGRAPH_ENDPOINT}
# INDEXER_SUBGRAPHS__NETWORK__QUERY_AUTH_TOKEN: ${FREE_QUERY_AUTH_TOKEN}
INDEXER_SUBGRAPHS__NETWORK__DEPLOYMENT_ID: ${NETWORK_SUBGRAPH_DEPLOYMENT}
INDEXER_SUBGRAPHS__NETWORK__SYNCING_INTERVAL_SECS: ${NETWORK_SYNCING_INTERVAL_SECS:-60}
INDEXER_SUBGRAPHS__NETWORK__RECENTLY_CLOSED_ALLOCATION_BUFFER_SECS: ${RECENTLY_CLOSED_ALLOCATION_BUFFER_SECS:-3600}
# Subgraphs - Escrow Configuration
INDEXER_SUBGRAPHS__ESCROW__QUERY_URL: ${NETWORK_ESCROW_ENDPOINT}
# INDEXER_SUBGRAPHS__ESCROW__QUERY_AUTH_TOKEN: ${FREE_QUERY_AUTH_TOKEN}
INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID: ${NETWORK_ESCROW_DEPLOYMENT}
INDEXER_SUBGRAPHS__ESCROW__SYNCING_INTERVAL_SECS: ${NETWORK_SYNCING_INTERVAL_SECS:-60}
# Blockchain Configuration
INDEXER_BLOCKCHAIN__CHAIN_ID: ${INDEXER_CHAIN_ID:-42161}
INDEXER_BLOCKCHAIN__RECEIPTS_VERIFIER_ADDRESS: ${INDEXER_RECEIPTS_VERIFIER_ADDRESS:-0x33f9E93266ce0E108fc85DdE2f71dab555A0F05a}
# Service Configuration
INDEXER_SERVICE__HOST_AND_PORT: "0.0.0.0:7600"
INDEXER_SERVICE__URL_PREFIX: "/"
INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH: ${INDEXER_SERVE_NETWORK_SUBGRAPH:-false}
INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH: ${INDEXER_SERVE_ESCROW_SUBGRAPH:-false}
# INDEXER_SERVICE__SERVE_AUTH_TOKEN: ${FREE_QUERY_AUTH_TOKEN}
# INDEXER_SERVICE__FREE_QUERY_AUTH_TOKEN: ${FREE_QUERY_AUTH_TOKEN}
# TAP Configuration
INDEXER_SERVICE__TAP__MAX_RECEIPT_VALUE_GRT: "0.001"
INDEXER_TAP__MAX_AMOUNT_WILLING_TO_LOSE_GRT: "20"
INDEXER_TAP__RAV_REQUEST__TRIGGER_VALUE_DIVISOR: "10"
INDEXER_TAP__RAV_REQUEST__TIMESTAMP_BUFFER_SECS: "60"
INDEXER_TAP__RAV_REQUEST__REQUEST_TIMEOUT_SECS: "5"
INDEXER_TAP__RAV_REQUEST__MAX_RECEIPTS_PER_REQUEST: "10000"
# TAP Sender Aggregator Endpoints
INDEXER_TAP__SENDER_AGGREGATOR_ENDPOINTS__0xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467: "https://tap-aggregator.network.thegraph.com"
services:
######################################################################################
##################### CLI CONTAINER #######################
######################################################################################
cli:
build:
context: ./cli
dockerfile: Dockerfile
args:
INDEXER_CLI_VERSION: ${INDEXER_CLI_VERSION:-ghcr.io/graphprotocol/indexer-cli:v0.21.6-2}
container_name: cli
restart: unless-stopped
environment:
GEO_COORDINATES: ${GEO_COORDINATES:-69.42069 69.42069}
tty: true
networks:
- monitor-net
volumes:
- ./cli/scripts:/root/scripts/
- ./cli/history:/history
######################################################################################
##################### INDEXER AGENT CONTAINER #######################
######################################################################################
indexer-agent:
image: ${INDEXER_AGENT_VERSION:-ghcr.io/graphprotocol/indexer-agent:v0.21.6-2}
container_name: indexer-agent
depends_on:
- postgres-agent
expose:
- 7300
- 8000
- 8001
- 8002
environment:
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_ALLOCATION_MANAGEMENT: ${INDEXER_AGENT_ALLOCATION_MANAGEMENT:-auto}
INDEXER_AGENT_REBATE_CLAIM_THRESHOLD: ${REBATE_CLAIM_THRESHOLD:-0}
INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD: ${REBATE_CLAIM_BATCH_THRESHOLD:-0}
INDEXER_AGENT_REBATE_CLAIM_MAX_BATCH_SIZE: ${REBATE_CLAIM_MAX_BATCH_SIZE:-100}
INDEXER_AGENT_VOUCHER_REDEMPTION_THRESHOLD: ${VOUCHER_REDEMPTION_THRESHOLD:-0}
INDEXER_AGENT_VOUCHER_REDEMPTION_BATCH_THRESHOLD: ${VOUCHER_REDEMPTION_BATCH_THRESHOLD:-0}
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: ${NETWORK_SUBGRAPH_ENDPOINT}
INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT: ${NETWORK_SUBGRAPH_DEPLOYMENT}
INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT: ${EPOCH_SUBGRAPH_ENDPOINT}
INDEXER_AGENT_POSTGRES_HOST: ${AGENT_DB_HOST:-postgres-agent}
INDEXER_AGENT_POSTGRES_USERNAME: ${AGENT_DB_USER:-your_db_user}
INDEXER_AGENT_POSTGRES_PASSWORD: ${AGENT_DB_PASS:-your_db_password}
INDEXER_AGENT_POSTGRES_DATABASE: ${AGENT_DB_NAME:-your_agent_db_name}
INDEXER_AGENT_DAI_CONTRACT: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
INDEXER_AGENT_GATEWAY_ENDPOINT: https://gateway-arbitrum.network.thegraph.com/
INDEXER_AGENT_OFFCHAIN_SUBGRAPHS: ${INDEXER_AGENT_OFFCHAIN_SUBGRAPHS}
INDEXER_AGENT_GAS_PRICE_MAX: ${INDEXER_AGENT_GAS_PRICE_MAX:-5000}
INDEXER_AGENT_SUBGRAPH_MAX_BLOCK_DISTANCE: 1000
INDEXER_AGENT_TAP_SUBGRAPH_ENDPOINT: ${NETWORK_ESCROW_ENDPOINT:-https://api.thegraph.com/subgraphs/name/graphprotocol/tap-escrow-subgraph}
#INDEXER_AGENT_POI_DISPUTE_MONITORING: "true"
#INDEXER_AGENT_POI_DISPUTABLE_EPOCHS: 100
networks:
- monitor-net
restart: unless-stopped
######################################################################################
##################### INDEXER SERVICE CONTAINER #######################
######################################################################################
indexer-service:
image: ${INDEXER_SERVICE_VERSION:-ghcr.io/graphprotocol/indexer-service-rs:1.3.2}
container_name: indexer-service
depends_on:
- postgres-agent
environment:
RUST_LOG: ${INDEXER_SERVICE_LOG_LEVEL:-DEBUG}
<<: *indexer-environment
expose:
- 7300
- 7600
networks:
- monitor-net
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.services.indexer-service.loadbalancer.server.port=7600"
- "traefik.http.routers.indexer-service.entrypoints=websecure"
- "traefik.http.routers.indexer-service.tls.certresolver=myresolver"
- "traefik.http.routers.indexer-service.rule=Host(`$INDEX_HOST`)"
######################################################################################
###################### INDEXER TAP CONTAINER ##########################
######################################################################################
indexer-tap:
image: ${INDEXER_TAP_VERSION:-ghcr.io/graphprotocol/indexer-tap-agent:1.7.2}
container_name: indexer-tap
depends_on:
- postgres-agent
environment:
RUST_LOG: ${TAP_AGENT_LOG_LEVEL:-DEBUG}
<<: *indexer-environment
networks:
- monitor-net
restart: unless-stopped
######################################################################################
##################### POSTGRES AGENT CONTAINER #######################
######################################################################################
postgres-agent:
image: ${POSTGRES_AGENT_VERSION:-postgres:16.4}
container_name: postgres-agent
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
restart: unless-stopped
environment:
POSTGRES_USER: ${AGENT_DB_USER:-your_db_user}
POSTGRES_PASSWORD: ${AGENT_DB_PASS:-your_db_password}
POSTGRES_DB: ${AGENT_DB_NAME:-your_agent_db_name}
volumes:
- postgres-agent_data:/var/lib/postgresql/data
networks:
- monitor-net
expose:
- 5432
######################################################################################
##################### SUBGRAPH RADIO CONTAINER ##################
######################################################################################
subgraph-radio:
image: ghcr.io/graphops/subgraph-radio:1.0.6
container_name: subgraph-radio
expose:
- 3010
- 3012
restart: unless-stopped
environment:
GRAPHCAST_NETWORK: ${GRAPHCAST_NETWORK:-mainnet}
REGISTRY_SUBGRAPH: ${REGISTRY_SUBGRAPH_ENDPOINT}
NETWORK_SUBGRAPH: ${NETWORK_SUBGRAPH_ENDPOINT}
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=true"
- "--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"