-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
164 lines (159 loc) · 4.22 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
version: "3.5"
networks:
default:
name: cdk-validium
services:
rpc:
stop_grace_period: 2m
container_name: cdk-validium-rpc
restart: unless-stopped
depends_on:
pool-db:
condition: service_healthy
state-db:
condition: service_healthy
prover-db:
condition: service_healthy
synchronizer:
condition: service_started
executor:
condition: service_started
image: ${CDK_VALIDIUM_NODE_IMAGE}
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
ports:
- 8547:8545
- 8548:8546
- 9091:9091 # needed if metrics enabled
environment:
- ZKEVM_NODE_ETHERMAN_URL=${L1_RPC_URL}
- ZKEVM_NODE_RPC_SEQUENCERNODEURI=${L2_SEQUENCER_URL}
volumes:
- ./config/node.config.toml:/app/config.toml
- ./config/genesis.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network custom --cfg /app/config.toml --components rpc --custom-network-file /app/genesis.json"
synchronizer:
stop_grace_period: 2m
container_name: cdk-validium-synchronizer
restart: unless-stopped
depends_on:
state-db:
condition: service_healthy
prover-db:
condition: service_healthy
executor:
condition: service_started
image: ${CDK_VALIDIUM_NODE_IMAGE}
ports:
- 9092:9091 # needed if metrics enabled
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 512M
environment:
- ZKEVM_NODE_ETHERMAN_URL=${L1_RPC_URL}
volumes:
- ./config/node.config.toml:/app/config.toml
- ./config/genesis.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network custom --cfg /app/config.toml --components synchronizer --custom-network-file /app/genesis.json"
prover-db:
stop_grace_period: 3m
container_name: cdk-validium-prover-db
restart: unless-stopped
image: postgres:15
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d prover_db -U prover_user" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5432:5432
volumes:
- ./scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql
- ${PROVER_DB_DATA_DIR}:/var/lib/postgresql/data
- ./config/postgresql.conf:/etc/postgresql.conf
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
command:
- "postgres"
- "-N"
- "500"
- "-c"
- "config_file=/etc/postgresql.conf"
state-db:
stop_grace_period: 3m
container_name: cdk-validium-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:
- 5433:5432
volumes:
- ${STATE_DB_DATA_DIR}:/var/lib/postgresql/data
- ./config/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"
pool-db:
stop_grace_period: 3m
container_name: cdk-validium-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:
- 5434:5432
volumes:
- ${POOL_DB_DATA_DIR}:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pool_user
- POSTGRES_PASSWORD=pool_password
- POSTGRES_DB=pool_db
command:
- "postgres"
- "-N"
- "500"
executor:
stop_grace_period: 2m
container_name: cdk-validium-executor
restart: unless-stopped
image: ${ZKEVM_PROVER_IMAGE}
depends_on:
state-db:
condition: service_healthy
prover-db:
condition: service_healthy
ports:
- 5061:5061 # MT
- 5071:5071 # Executor
volumes:
- ./config/prover.config.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json