forked from StakeSquid/graphprotocol-testnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose-autoagora.yml
288 lines (257 loc) · 11 KB
/
compose-autoagora.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
version: '2.1'
x-logging:
&default-logging
options:
max-file: '1'
compress: 'false'
driver: local
networks:
monitor-net:
driver: bridge
volumes:
postgres2_data: {}
postgres_agora_data: {}
rabbitmq_etc: {}
rabbitmq_data: {}
services:
######################################################################################
##################### INDEXER AGENT CONTAINER #######################
######################################################################################
indexer-agent:
image: ${INDEXER_AGENT_VERSION:-ghcr.io/graphprotocol/indexer-agent:v0.20.12}
container_name: indexer-agent
depends_on:
- postgres2
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_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-goerli
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:-60.16952 24.93545}
INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT: ${INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT:-https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-goerli}
INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT: ${NETWORK_SUBGRAPH_DEPLOYMENT}
INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT: ${INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT:-https://api.thegraph.com/subgraphs/name/juanmardefago/arb-goerli-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: "0x9e7e607afd22906f7da6f1ec8f432d6f244278be"
INDEXER_AGENT_COLLECT_RECEIPTS_ENDPOINT: https://gateway-testnet-arbitrum.network.thegraph.com/collect-receipts
INDEXER_AGENT_OFFCHAIN_SUBGRAPHS: ${INDEXER_AGENT_OFFCHAIN_SUBGRAPHS}
INDEXER_AGENT_GAS_PRICE_MAX: ${INDEXER_AGENT_GAS_PRICE_MAX:-50}
networks:
- monitor-net
restart: unless-stopped
logging: *default-logging
######################################################################################
##################### INDEXER SERVICE CONTAINER #######################
######################################################################################
indexer-service:
image: ${INDEXER_SERVICE_VERSION:-ghcr.io/semiotic-ai/autoagora-indexer-service:v0.1.2-v0.20.14}
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-goerli
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://thegraph.com/hosted-service/subgraph/graphprotocol/graph-network-arbitrum-goerli}
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_WALLET_WORKER_THREADS: ${WORKER_THREADS_PER_INDEXER_SERVICE:-8}
INDEXER_SERVICE_CLIENT_SIGNER_ADDRESS: "0xac01B0b3B2Dc5D8E0D484c02c4d077C15C96a7b4"
INDEXER_SERVICE_QUERY_TIMING_LOGS: "true"
RABBITMQ_HOST: rabbitmq
RABBITMQ_USERNAME: ${RABBITMQ_USER:-rabbitmquser}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD:-rabbitmqpassword}
SKIP_EVM_VALIDATION: "true"
SERVER_HOST: ${AGENT_DB_HOST:-postgres2}
SERVER_PORT: 5432
SERVER_DB_USER: ${DB_USER:-graph-node}
SERVER_DB_PASSWORD: ${DB_PASS:-db-password}
SERVER_DB_NAME: ${AGENT_DB_NAME:-indexer-agent}
expose:
- 7300
- 7600
networks:
- monitor-net
restart: unless-stopped
logging: *default-logging
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`)"
######################################################################################
##################### RABBITMQ CONTAINER #######################
######################################################################################
rabbitmq:
image: rabbitmq:3.9.25
container_name: rabbitmq
volumes:
- rabbitmq_etc:/etc/rabbitmq/
- rabbitmq_data:/var/lib/rabbitmq/
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER:-rabbitmquser}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:-rabbitmqpassword}
expose:
- 5672
- 15672
networks:
- monitor-net
restart: unless-stopped
######################################################################################
##################### AUTOAGORA PROCESSOR CONTAINER #######################
######################################################################################
ag-processor:
image: kwetlesen/autoagora-processor:latest
container_name: ag-processor
volumes:
- ./postgres-socket:/var/run/postgresql
depends_on:
- indexer-service
- postgres-agora
- rabbitmq
restart: unless-stopped
environment:
RABBITMQ_HOST: rabbitmq
RABBITMQ_USERNAME: ${RABBITMQ_USER:-rabbitmquser}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD:-rabbitmqpassword}
GRAPH_NODE_QUERY_ENDPOINT: http://query-node-0:8000
GRAPH_POSTGRES_HOST: ${DB_HOST:-postgres}
GRAPH_POSTGRES_DATABASE: ${GRAPH_NODE_DB_NAME:-graph-node}
GRAPH_POSTGRES_USERNAME: ${DB_USER:-graph-node}
GRAPH_POSTGRES_PASSWORD: ${DB_PASS:-db-password}
LOG_LEVEL: DEBUG
POSTGRES_HOST: postgres-agora
POSTGRES_DATABASE: autoagora
POSTGRES_USERNAME: autoagora
POSTGRES_PASSWORD: autoagora-password
networks:
- monitor-net
logging: *default-logging
######################################################################################
##################### AUTOAGORA CONTAINER #######################
######################################################################################
ag:
image: ghcr.io/semiotic-ai/autoagora:v1.3.0
container_name: ag
restart: unless-stopped
volumes:
- ./postgres-socket:/var/run/postgresql
depends_on:
- indexer-service
- postgres-agora
- rabbitmq
- ag-processor
environment:
INDEXER_AGENT_MGMT_ENDPOINT: http://indexer-agent:8000
INDEXER_SERVICE_METRICS_ENDPOINT: http://indexer-service:7300/metrics
LOGS_POSTGRES_HOST: postgres-agora
LOGS_POSTGRES_PORT: 5432
LOGS_POSTGRES_DATABASE: autoagora
LOGS_POSTGRES_USERNAME: autoagora
LOGS_POSTGRES_PASSWORD: autoagora-password
LOG_LEVEL: DEBUG
JSON_LOGS: "true"
networks:
- monitor-net
logging: *default-logging
######################################################################################
##################### POSTGRES AGENT CONTAINER #######################
######################################################################################
postgres2:
image: postgres:13.6
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
logging: *default-logging
######################################################################################
##################### POSTGRES AGORA CONTAINER #######################
######################################################################################
postgres-agora:
image: postgres:13.6
container_name: postgres-agora
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
restart: unless-stopped
environment:
POSTGRES_USER: autoagora
POSTGRES_PASSWORD: autoagora-password
POSTGRES_DB: autoagora
volumes:
- postgres_agora_data:/var/lib/postgresql/data
networks:
- monitor-net
expose:
- 5432
logging: *default-logging
######################################################################################
##################### 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"