forked from GloWE3/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (116 loc) · 3.26 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
version: "3.5"
networks:
default:
name: zkevm
services:
zkevm-rpc:
container_name: zkevm-rpc
restart: unless-stopped
depends_on:
zkevm-pool-db:
condition: service_healthy
zkevm-state-db:
condition: service_healthy
zkevm-sync:
condition: service_started
image: zkevm-node
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
ports:
- 8545:8545
- 9091:9091 # needed if metrics enabled
environment:
- ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_NODE_ETHERMAN_URL}
volumes:
- ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/${ZKEVM_NETWORK}}/node.config.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components rpc"
zkevm-sync:
container_name: zkevm-sync
restart: unless-stopped
depends_on:
zkevm-state-db:
condition: service_healthy
image: zkevm-node
ports:
- 9092:9091 # needed if metrics enabled
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
environment:
- ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_NODE_ETHERMAN_URL}
volumes:
- ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/${ZKEVM_NETWORK}}/node.config.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components synchronizer"
zkevm-state-db:
container_name: zkevm-state-db
restart: unless-stopped
image: postgres:15
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5432:5432
volumes:
- ./db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql
- ${ZKEVM_NODE_STATEDB_DATA_DIR}:/var/lib/postgresql/data
- ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/${ZKEVM_NETWORK}}/postgresql.conf:/etc/postgresql.conf
environment:
- POSTGRES_USER=state_user
- POSTGRES_PASSWORD=state_password
- POSTGRES_DB=state_db
command:
- "postgres"
- "-N"
- "500"
- "-c"
- "config_file=/etc/postgresql.conf"
zkevm-pool-db:
container_name: zkevm-pool-db
restart: unless-stopped
image: postgres:15
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5433:5432
volumes:
- ${ZKEVM_NODE_POOLDB_DATA_DIR}:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pool_user
- POSTGRES_PASSWORD=pool_password
- POSTGRES_DB=pool_db
command:
- "postgres"
- "-N"
- "500"
zkevm-prover:
container_name: zkevm-prover
restart: unless-stopped
image: hermeznetwork/zkevm-prover:v6.0.2-RC2
depends_on:
zkevm-state-db:
condition: service_healthy
ports:
- 50061:50061 # MT
- 50071:50071 # Executor
volumes:
- ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/${ZKEVM_NETWORK}}/prover.config.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json