services: app: build: context: . dockerfile: ./packages/app/Dockerfile ports: - '3010:3010' depends_on: - api restart: unless-stopped worker: build: context: . dockerfile: ./packages/worker/Dockerfile environment: - PORT=3001 - LOG_LEVEL=verbose - DATABASE_HOST=postgres - DATABASE_USER=postgres - DATABASE_PASSWORD=postgres - DATABASE_NAME=block-explorer - BLOCKCHAIN_RPC_URL=http://zksync:3050 - DATA_FETCHER_URL=http://data-fetcher:3040 ports: - '3001:3001' depends_on: zksync: condition: service_healthy restart: unless-stopped data-fetcher: build: context: . dockerfile: ./packages/data-fetcher/Dockerfile environment: - PORT=3040 - LOG_LEVEL=verbose - BLOCKCHAIN_RPC_URL=http://zksync:3050 ports: - '3040:3040' depends_on: zksync: condition: service_healthy restart: unless-stopped api: build: context: . dockerfile: ./packages/api/Dockerfile environment: - PORT=3020 - METRICS_PORT=3005 - LOG_LEVEL=verbose - DATABASE_HOST=postgres - DATABASE_USER=postgres - DATABASE_PASSWORD=postgres - DATABASE_NAME=block-explorer ports: - '3020:3020' - '3005:3005' depends_on: - worker restart: unless-stopped postgres: image: "postgres:18" logging: driver: none volumes: - postgres:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ] interval: 5s timeout: 5s retries: 5 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=block-explorer reth: restart: always image: "ghcr.io/paradigmxyz/reth:v0.2.0-beta.2" volumes: - type: bind source: ./reth_chaindata target: /chaindata command: node --dev --datadir /rethdata --http --http.addr 0.0.0.0 --http.port 8545 --dev.block-time 300ms --chain /chaindata/reth_config environment: - RUST_LOG=warn ports: - 127.0.0.1:8545:8545 zksync: stdin_open: true tty: true image: matterlabs/local-node:latest2.0 depends_on: postgres: condition: service_healthy reth: condition: service_started ports: - 127.0.0.1:3050:3050 # JSON RPC HTTP port - 127.0.0.1:3051:3051 # JSON RPC WS port volumes: # Configs folder bind - zksync-config:/etc/env/ # Storage folder bind - zksync-data:/var/lib/zksync/data environment: - DATABASE_PROVER_URL=postgres://postgres:postgres@postgres/prover_local - DATABASE_URL=postgres://postgres:postgres@postgres/zksync_local - ETH_CLIENT_WEB3_URL=http://reth:8545 healthcheck: test: curl --fail http://localhost:3071/health || exit 1 interval: 10s timeout: 5s retries: 60 start_period: 30s restart: unless-stopped volumes: reth: postgres: zksync-config: zksync-data: