forked from StakeSquid/graphprotocol-mainnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose-autoagora.yml
239 lines (213 loc) · 9.5 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
version: '3.7'
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.23}
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:-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: mainnet
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-mainnet}
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/mainnet-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: auto
INDEXER_AGENT_SUBGRAPH_MAX_BLOCK_DISTANCE: 1000
networks:
- monitor-net
restart: unless-stopped
######################################################################################
##################### INDEXER SERVICE CONTAINER #######################
######################################################################################
indexer-service:
image: ${INDEXER_SERVICE_VERSION:-ghcr.io/semiotic-ai/autoagora-indexer-service:v0.1.2-v0.20.23}
container_name: indexer-service
depends_on:
- postgres2
- rabbitmq
environment:
INDEXER_SERVICE_MNEMONIC: ${OPERATOR_SEED_PHRASE}
INDEXER_SERVICE_INDEXER_ADDRESS: ${STAKING_WALLET_ADDRESS}
INDEXER_SERVICE_PORT: 7600
INDEXER_SERVICE_ETHEREUM_NETWORK: mainnet
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-mainnet}
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: "0x982D10c56b8BBbD6e09048F5c5f01b43C65D5aE0"
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
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
######################################################################################
##################### AUTOAGORA CONTAINER #######################
######################################################################################
ag:
image: kwetlesen/autoagora:latest
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
######################################################################################
##################### 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
######################################################################################
##################### 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