forked from oceanprotocol/barge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
250 lines (240 loc) · 6.59 KB
/
docker-compose.yaml
File metadata and controls
250 lines (240 loc) · 6.59 KB
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
services:
anvil:
image: ghcr.io/foundry-rs/foundry:v1.5.0
ports:
- 8545:8545
volumes:
- anvil-data:/data
user: "0" # Needed to write state to volume
entrypoint: [
"anvil",
"--hardfork",
"london",
"--mnemonic",
"${MNEMONIC:-taxi music thumb unique chat sand crew more leg another off lamp}",
"--host",
"0.0.0.0",
"--port",
"8545",
"--chain-id",
"8996",
"--gas-limit",
"50000000",
"--accounts",
"10",
# "--preserve-historical-states",
"--state-interval",
"60",
"--state",
"/data/state.json",
# "--always-generate-state-file",
# "-q", # quiet mode
]
networks:
ocean:
ipv4_address: 172.16.0.3
aquarius:
build: aquarius
depends_on:
provider:
condition: service_healthy
restart: true
elasticsearch:
condition: service_healthy
restart: true
ocean-contracts:
condition: service_completed_successfully
restart: true
ports:
- 10000:5000
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/usr/local/.ocean/:ro
environment:
ADDRESS_FILE: /usr/local/.ocean/address.json
RUN_AQUARIUS_SERVER: 1
RUN_EVENTS_MONITOR: 1
EVENTS_HTTP: 1
EVENTS_RPC: http://anvil:8545
LOG_LEVEL: ${LOG_LEVEL}
DB_MODULE: elasticsearch
DB_HOSTNAME: http://elasticsearch
DB_PORT: 9200
DB_USERNAME: elastic
DB_PASSWORD: changeme
DB_SSL: false
DB_VERIFY_CERTS: false
NETWORK_NAME: ${CONTRACTS_NETWORK_NAME}
PURGATORY_UPDATE_INTERVAL: 60
EVENTS_MONITOR_SLEEP_TIME: 30
PRIVATE_KEY: ef4b441145c1d0f3b4bc6d61d29f5c6e502359481152f869247c7a4244d45209
BLOCKS_CHUNK_SIZE: 5000
PROCESS_RETRY_QUEUE: 1
SUBGRAPH_URLS: '{"8996": "http://graph-node:8000"}'
networks:
ocean:
ipv4_address: 172.16.0.10
provider:
build: provider
ports:
- "8030:8030"
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/usr/local/.ocean/:ro
depends_on:
ocean-contracts:
condition: service_completed_successfully
restart: true
environment:
ADDRESS_FILE: /usr/local/.ocean/address.json
AQUARIUS_URL: http://aquarius:5000
NETWORK_URL: '{"8996": "http://anvil:8545"}'
IPFS_GATEWAY: ipfs:5005
PROVIDER_PRIVATE_KEY: '{"8996": "ef4b441145c1d0f3b4bc6d61d29f5c6e502359481152f869247c7a4244d45209"}'
PROVIDER_ADDRESS: 0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8030/ || exit 1"]
interval: 30s
timeout: 10s
retries: 2
start_period: 5s
networks:
ocean:
ipv4_address: 172.16.0.12
elasticsearch:
image: elasticsearch:${ELASTICSEARCH_VERSION:-8.7.0}
ports:
- 9200:9200
environment:
ES_JAVA_OPTS: "-Xms2g -Xmx2g"
MAX_MAP_COUNT: "64000"
discovery.type: "single-node"
ELASTIC_PASSWORD: "changeme"
xpack.security.enabled: "false"
xpack.security.http.ssl.enabled: "false"
networks:
ocean:
ipv4_address: 172.16.0.6
healthcheck:
test:
[
"CMD-SHELL",
"curl -f -s http://localhost:9200/_cluster/health?wait_for_status=yellow || exit 1",
]
interval: 10s
timeout: 5s
retries: 2
start_period: 30s
graph-node:
image: graphprotocol/graph-node:v0.41.1
ports:
- "9000:8000"
- "8001:8001"
- "8020:8020"
- "8040:8030"
- "8050:8040"
depends_on:
- ipfs
- postgres
environment:
postgres_host: postgres
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: ipfs:5001
ethereum: development:http://anvil:8545
RUST_LOG: info
GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE: 100
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "8030"]
interval: 30s
timeout: 5s
retries: 2
start_period: 20s
networks:
ocean:
ipv4_address: 172.16.0.17
ipfs:
image: ipfs/go-ipfs:v0.4.23
ports:
- "5001:5001"
- "5005:8080"
volumes:
- graphipfs:/data/ipfs
networks:
ocean:
ipv4_address: 172.16.0.16
postgres:
image: postgres:18
ports:
- "5432:5432"
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
POSTGRES_INITDB_ARGS: "--locale=C --lc-collate=C --lc-ctype=C --encoding=UTF8"
volumes:
- pgdata:/var/lib/postgresql
networks:
- ocean
subgraph:
build:
context: .
dockerfile: ocean-subgraph/Dockerfile
depends_on:
graph-node:
condition: service_healthy
restart: true
ocean-contracts:
condition: service_completed_successfully
restart: true
# entrypoint: ["sleep", "infinity"]
environment:
IPFS: http://ipfs:5001
GRAPH_NODE: http://graph-node:8020
ADDRESS_FILE: /ocean-contracts/artifacts/address.json
OCEAN_ARTIFACTS_FOLDER: /ocean-contracts/artifacts/
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/:ro
- ${OCEAN_HOME}/subgraph:/ocean-subgraph/:cached
networks:
- ocean
ocean-contracts:
build:
context: ocean-subgraph/contracts
environment:
MNEMONIC: ${MNEMONIC:-taxi music thumb unique chat sand crew more leg another off lamp}
DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS}
NETWORK: ${CONTRACTS_NETWORK_NAME}
NETWORK_NAME: ${CONTRACTS_NETWORK_NAME}
NETWORK_RPC_HOST: ${NETWORK_RPC_HOST:-anvil}
NETWORK_RPC_PORT: ${NETWORK_RPC_PORT:-8545}
NETWORK_RPC_URL: ${NETWORK_RPC_URL:-http://anvil:8545}
ADDRESS_FILE: /ocean-contracts/addresses/address.json
# entrypoint: "cp -r /ocean-contracts/artifacts/. /ocean-contracts/outputs/ & cp /ocean-contracts/addresses/address.json /ocean-contracts/outputs/"
# entrypoint: ["sleep", "infinity"]
depends_on:
- anvil
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/outputs/:cached
- ./.ccache:/ocean-contracts/ccache:cached
networks:
- ocean
healthcheck:
test: ["CMD", "test", "-f", "/ocean-contracts/outputs/ready"]
interval: 5s
timeout: 2s
retries: 30
start_period: 1m
volumes:
graphipfs:
registryvol:
pgdata:
anvil-data:
networks:
ocean:
name: ocean
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.0.0/24