forked from hiero-ledger/hiero-local-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·343 lines (330 loc) · 10.3 KB
/
docker-compose.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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
version: "2.4"
services:
haveged:
image: "${HAVEGED_IMAGE_PREFIX}network-node-haveged:${HAVEGED_IMAGE_TAG}"
container_name: haveged
restart: always
mem_swappiness: 0
privileged: true
network_mode: none
network-node:
image: "${NETWORK_NODE_IMAGE_PREFIX}${NETWORK_NODE_IMAGE_NAME}:${NETWORK_NODE_IMAGE_TAG}"
container_name: network-node
user: root
mem_swappiness: 0
mem_limit: "${NETWORK_NODE_MEM_LIMIT}"
memswap_limit: "${NETWORK_NODE_MEM_LIMIT}"
environment:
JAVA_HEAP_MIN: "${PLATFORM_JAVA_HEAP_MIN}"
JAVA_HEAP_MAX: "${PLATFORM_JAVA_HEAP_MAX}"
JAVA_OPTS: "${PLATFORM_JAVA_OPTS}"
healthcheck:
test: ["CMD", "grep", "ServicesMain - Now current platform status = ACTIVE", "/opt/hgcapp/services-hedera/HapiApp2.0/output/hgcaa.log"]
interval: 30s
timeout: 10s
retries: 10
start_period: 10s
depends_on:
haveged:
condition: service_started
record-streams-uploader:
condition: service_started
networks:
network-node-bridge:
ipv4_address: 172.27.0.3
ports:
- "50211:50211"
- "50212:50212"
volumes:
- "${NETWORK_NODE_LOGS_ROOT_PATH}/accountBalances:/opt/hgcapp/accountBalances"
- "${NETWORK_NODE_LOGS_ROOT_PATH}/recordStreams:/opt/hgcapp/recordStreams"
- "${APPLICATION_CONFIG_PATH}:/opt/hgcapp/services-hedera/HapiApp2.0/data/config"
- "${NETWORK_NODE_LOGS_ROOT_PATH}/logs:/opt/hgcapp/services-hedera/HapiApp2.0/output"
- "${APPLICATION_ROOT_PATH}/data/keys:/opt/hgcapp/services-hedera/HapiApp2.0/data/keys"
- "${APPLICATION_ROOT_PATH}/data/onboard:/opt/hgcapp/services-hedera/HapiApp2.0/data/onboard"
- "${NETWORK_NODE_LOGS_ROOT_PATH}/stats:/opt/hgcapp/services-hedera/HapiApp2.0/data/stats"
- "${APPLICATION_ROOT_PATH}/config.txt:/opt/hgcapp/services-hedera/HapiApp2.0/config.txt"
- "${APPLICATION_ROOT_PATH}/settings.txt:/opt/hgcapp/services-hedera/HapiApp2.0/settings.txt"
- "${APPLICATION_ROOT_PATH}/log4j2.xml:/opt/hgcapp/services-hedera/HapiApp2.0/log4j2.xml"
- "${APPLICATION_ROOT_PATH}/hedera.crt:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.crt"
- "${APPLICATION_ROOT_PATH}/hedera.key:/opt/hgcapp/services-hedera/HapiApp2.0/hedera.key"
record-streams-uploader:
image: "${UPLOADER_IMAGE_PREFIX}uploader-mirror:${UPLOADER_IMAGE_TAG}"
container_name: record-streams-uploader
user: root
restart: unless-stopped
depends_on:
minio:
condition: service_started
networks:
- cloud-storage
environment:
DEBUG: "true"
REAPER_ENABLE: "true"
REAPER_MIN_KEEP: "1"
REAPER_INTERVAL: "5"
S3_ENABLE: "true"
GCS_ENABLE: "false"
SIG_REQUIRE: "true"
SIG_PRIORITIZE: "true"
SIG_EXTENSION: "rcd_sig"
STREAM_EXTENSION: "rcd"
BUCKET_NAME: "hedera-streams"
BUCKET_PATH: "recordstreams/record0.0.3"
S3_ACCESS_KEY: "minioadmin"
S3_SECRET_KEY: "minioadmin"
volumes:
- "${NETWORK_NODE_LOGS_ROOT_PATH}/recordStreams/record0.0.3:/records"
command:
- /usr/bin/env
- ${PYTHON_VERSION}
- /usr/local/bin/mirror.py
- --linux
- --watch-directory
- /records
- --s3-endpoint
- http://minio:9000
- --debug
account-balances-uploader:
image: "${UPLOADER_IMAGE_PREFIX}uploader-mirror:${UPLOADER_IMAGE_TAG}"
container_name: account-balances-uploader
user: root
restart: unless-stopped
depends_on:
minio:
condition: service_started
networks:
- cloud-storage
environment:
DEBUG: "true"
REAPER_ENABLE: "true"
REAPER_MIN_KEEP: "1"
REAPER_INTERVAL: "5"
S3_ENABLE: "true"
GCS_ENABLE: "false"
SIG_REQUIRE: "true"
SIG_PRIORITIZE: "true"
SIG_EXTENSION: "pb_sig"
STREAM_EXTENSION: "pb"
BUCKET_NAME: "hedera-streams"
BUCKET_PATH: "accountBalances/balance0.0.3"
S3_ACCESS_KEY: "minioadmin"
S3_SECRET_KEY: "minioadmin"
volumes:
- "${NETWORK_NODE_LOGS_ROOT_PATH}/accountBalances/balance0.0.3:/balances"
command:
- /usr/bin/env
- ${PYTHON_VERSION}
- /usr/local/bin/mirror.py
- --linux
- --watch-directory
- /balances
- --s3-endpoint
- http://minio:9000
- --debug
minio:
image: minio/minio
container_name: minio
entrypoint: sh
command: -c 'mkdir -p /data/hedera-streams && minio server /data --console-address ":9001"'
environment:
MINIO_ROOT_USER: "${MINIO_ROOT_USER}"
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD}"
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
networks:
- cloud-storage
ports:
- "9000:9000"
- "9001:9001"
volumes:
- "minio-data:/data"
db:
image: "${MIRROR_POSTGRES_IMAGE}"
container_name: mirror-node-db
environment:
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
GRPC_PASSWORD: mirror_grpc_pass
IMPORTER_PASSWORD: mirror_importer_pass
OWNER_PASSWORD: mirror_node_pass
POSTGRES_PASSWORD: postgres_password
REST_PASSWORD: mirror_api_pass
ROSETTA_PASSWORD: mirror_rosetta_pass
networks:
- mirror-node
expose:
- "5432"
restart: unless-stopped
stop_grace_period: 2m
stop_signal: SIGTERM
tty: true
volumes:
- ./compose-network/mirror-node/init.sh:/docker-entrypoint-initdb.d/init.sh
- type: volume
source: mirror-node-postgres
target: /var/lib/postgresql/data
grpc:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-grpc:${MIRROR_IMAGE_TAG}"
container_name: mirror-node-grpc
restart: unless-stopped
mem_swappiness: 0
mem_limit: "${MIRROR_GRPC_MEM_LIMIT}"
memswap_limit: "${MIRROR_GRPC_MEM_LIMIT}"
depends_on:
network-node:
condition: service_started
db:
condition: service_started
environment:
HEDERA_MIRROR_GRPC_DB_HOST: db
SPRING_CONFIG_ADDITIONAL_LOCATION: file:/usr/etc/hedera-mirror-grpc/
networks:
- mirror-node
ports:
- "5600:5600"
volumes:
- ./compose-network/mirror-node/application.yml:/usr/etc/hedera-mirror-grpc/application.yml
importer:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-importer:${MIRROR_IMAGE_TAG}"
container_name: mirror-node-importer
restart: unless-stopped
mem_swappiness: 0
mem_limit: "${MIRROR_IMPORTER_MEM_LIMIT}"
memswap_limit: "${MIRROR_IMPORTER_MEM_LIMIT}"
depends_on:
minio:
condition: service_started
db:
condition: service_started
environment:
HEDERA_MIRROR_IMPORTER_DB_HOST: db
SPRING_CONFIG_ADDITIONAL_LOCATION: file:/usr/etc/hedera-mirror-importer/
networks:
- cloud-storage
- mirror-node
volumes:
- ./compose-network/mirror-node/application.yml:/usr/etc/hedera-mirror-importer/application.yml
- ./compose-network/mirror-node/addressBook.bin:/usr/etc/hedera-mirror-importer/local-dev-1-node.addressbook.f102.json.bin
rest:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-rest:${MIRROR_IMAGE_TAG}"
container_name: mirror-node-rest
mem_swappiness: 0
mem_limit: "${MIRROR_REST_MEM_LIMIT}"
memswap_limit: "${MIRROR_REST_MEM_LIMIT}"
depends_on:
importer:
condition: service_started
db:
condition: service_started
environment:
HEDERA_MIRROR_REST_DB_HOST: db
networks:
- mirror-node
ports:
- "5551:5551"
restart: unless-stopped
tty: true
web3:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-web3:${MIRROR_IMAGE_TAG}"
container_name: mirror-node-web3
mem_swappiness: 0
mem_limit: "${MIRROR_WEB3_MEM_LIMIT}"
memswap_limit: "${MIRROR_WEB3_MEM_LIMIT}"
depends_on:
importer:
condition: service_started
db:
condition: service_started
networks:
- mirror-node
environment:
HEDERA_MIRROR_WEB3_DB_HOST: db
ports:
- "8545:8545"
restart: unless-stopped
tty: true
monitor:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-monitor:${MIRROR_IMAGE_TAG}"
container_name: mirror-node-monitor
mem_swappiness: 0
mem_limit: "${MIRROR_MONITOR_MEM_LIMIT}"
memswap_limit: "${MIRROR_MONITOR_MEM_LIMIT}"
depends_on:
grpc:
condition: service_started
rest:
condition: service_started
network-node:
condition: service_healthy
networks:
- mirror-node
- network-node-bridge
environment:
SPRING_CONFIG_ADDITIONAL_LOCATION: "file:/usr/etc/hedera-mirror-monitor/"
ports:
- "8082:8082"
restart: unless-stopped
tty: true
volumes:
- ./compose-network/mirror-node/application.yml:/usr/etc/hedera-mirror-monitor/application.yml
relay:
image: "${RELAY_IMAGE_PREFIX}hedera-json-rpc-relay:${RELAY_IMAGE_TAG}"
container_name: json-rpc-relay
mem_swappiness: 0
mem_limit: "${RELAY_MEM_LIMIT}"
memswap_limit: "${RELAY_MEM_LIMIT}"
depends_on:
rest:
condition: service_started
network-node:
condition: service_started
networks:
- json-rpc-relay
environment:
HEDERA_NETWORK: "${RELAY_HEDERA_NETWORK}"
OPERATOR_ID_MAIN: "${RELAY_OPERATOR_ID_MAIN}"
OPERATOR_KEY_MAIN: "${RELAY_OPERATOR_KEY_MAIN}"
CHAIN_ID: "${RELAY_CHAIN_ID}"
MIRROR_NODE_URL: "${RELAY_MIRROR_NODE_URL}"
LOCAL_NODE: "${RELAY_LOCAL_NODE}"
SERVER_PORT: "${RELAY_SERVER_PORT}"
E2E_RELAY_HOST: "${RELAY_E2E_HOST}"
ports:
- "7546:7546"
restart: unless-stopped
tty: true
networks:
network-node-bridge:
name: network-node-bridge
driver: bridge
ipam:
driver: default
config:
- subnet: 172.27.0.0/16
ip_range: 172.27.0.0/24
gateway: 172.27.0.254
mirror-node:
name: mirror-node
driver: bridge
cloud-storage:
name: cloud-storage
driver: bridge
json-rpc-relay:
name: json-rpc-relay
driver: bridge
volumes:
network-node-postgres:
name: network-node-postgres
mirror-node-postgres:
name: mirror-node-postgres
network-node-event-streams:
name: network-node-event-streams
network-node-record-streams:
name: network-node-record-streams
network-node-account-balances:
name: network-node-account-balances
network-node-stats:
name: network-node-stats
minio-data:
name: minio-data