178 lines
5.7 KiB
YAML
178 lines
5.7 KiB
YAML
version: "3.1"
|
|
|
|
services:
|
|
zkevm:
|
|
restart: unless-stopped
|
|
depends_on:
|
|
zkevm-pool-db:
|
|
condition: service_healthy
|
|
zkevm-state-db:
|
|
condition: service_healthy
|
|
zkevm-sync:
|
|
condition: service_started
|
|
image: hermeznetwork/zkevm-node:v0.3.2
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
reservations:
|
|
memory: 512M
|
|
expose:
|
|
- 8545 # http
|
|
- 8546 # ws
|
|
- 9091 # needed if metrics enabled
|
|
environment:
|
|
- ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_ETHEREUM_ENDPOINT}
|
|
volumes:
|
|
- ./zkevm/public.node.config.toml:/app/config.toml
|
|
command:
|
|
- "/bin/sh"
|
|
- "-c"
|
|
- "/app/zkevm-node run --network mainnet --cfg /app/config.toml --components rpc"
|
|
networks:
|
|
- chains
|
|
|
|
zkevm-proxy:
|
|
restart: unless-stopped
|
|
image: nginx
|
|
expose:
|
|
- 80
|
|
environment:
|
|
PROXY_HOST: zkevm
|
|
RPC_PORT: 8545
|
|
WS_PORT: 8546
|
|
networks:
|
|
- chains
|
|
volumes:
|
|
- ./nginx-proxy:/etc/nginx/templates
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.middlewares.zkevm-stripprefix.stripprefix.prefixes=/zkevm"
|
|
- "traefik.http.services.zkevm.loadbalancer.server.port=80"
|
|
- "traefik.http.routers.zkevm.entrypoints=websecure"
|
|
- "traefik.http.routers.zkevm.tls.certresolver=myresolver"
|
|
- "traefik.http.routers.zkevm.rule=Host(`$DOMAIN`) && PathPrefix(`/zkevm`)"
|
|
- "traefik.http.routers.zkevm.middlewares=zkevm-stripprefix, ipwhitelist"
|
|
|
|
|
|
zkevm-sync:
|
|
restart: unless-stopped
|
|
depends_on:
|
|
zkevm-state-db:
|
|
condition: service_healthy
|
|
image: hermeznetwork/zkevm-node:v0.3.2
|
|
expose:
|
|
- 9091 # needed if metrics enabled
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
reservations:
|
|
memory: 512M
|
|
environment:
|
|
- ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_ETHEREUM_ENDPOINT}
|
|
volumes:
|
|
- ./zkevm/public.node.config.toml:/app/config.toml
|
|
networks:
|
|
- chains
|
|
command:
|
|
- "/bin/sh"
|
|
- "-c"
|
|
- "/app/zkevm-node run --network mainnet --cfg /app/config.toml --components synchronizer"
|
|
|
|
zkevm-state-db:
|
|
restart: unless-stopped
|
|
image: postgres:15.4
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
expose:
|
|
- 5432
|
|
volumes:
|
|
- ./zkevm/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- zkevm-node-statedb:/var/lib/postgresql/data
|
|
- ./zkevm/postgresql.conf:/etc/postgresql.conf
|
|
environment:
|
|
- POSTGRES_USER=state_user
|
|
- POSTGRES_PASSWORD=state_password
|
|
- POSTGRES_DB=state_db
|
|
networks:
|
|
- chains
|
|
command:
|
|
- "postgres"
|
|
- "-N"
|
|
- "500"
|
|
- "-c"
|
|
- "config_file=/etc/postgresql.conf"
|
|
|
|
zkevm-pool-db:
|
|
restart: unless-stopped
|
|
image: postgres:15.4
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
expose:
|
|
- 5432
|
|
volumes:
|
|
- zkevm-node-pooldb:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=pool_user
|
|
- POSTGRES_PASSWORD=pool_password
|
|
- POSTGRES_DB=pool_db
|
|
networks:
|
|
- chains
|
|
command:
|
|
- "postgres"
|
|
- "-N"
|
|
- "500"
|
|
|
|
zkevm-log-db:
|
|
restart: unless-stopped
|
|
image: postgres:15.4
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
expose:
|
|
- 5434
|
|
volumes:
|
|
- ./zkevm/init_event_db.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- zkevm-node-logdb:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=log_user
|
|
- POSTGRES_PASSWORD=log_password
|
|
- POSTGRES_DB=log_db
|
|
networks:
|
|
- chains
|
|
command:
|
|
- "postgres"
|
|
- "-N"
|
|
- "500"
|
|
|
|
|
|
zkevm-prover:
|
|
restart: unless-stopped
|
|
image: hermeznetwork/zkevm-prover:v3.0.0
|
|
depends_on:
|
|
zkevm-state-db:
|
|
condition: service_healthy
|
|
expose:
|
|
- 50061 # MT
|
|
- 50071 # Executor
|
|
volumes:
|
|
- ./zkevm/public.prover.config.json:/usr/src/app/config.json
|
|
networks:
|
|
- chains
|
|
command: >
|
|
zkProver -c /usr/src/app/config.json
|
|
|
|
volumes:
|
|
zkevm-node-statedb:
|
|
zkevm-node-pooldb:
|
|
zkevm-node-logdb:
|