From cd2b51050969b40fb8c071aa6b4e1c1522f7de8b Mon Sep 17 00:00:00 2001 From: Oleh Bairak Date: Wed, 24 Jan 2024 15:59:40 +0100 Subject: [PATCH] fix: new --- docker-compose.yaml | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2f91e5879d..7d93f6e21e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -74,6 +74,61 @@ services: - worker restart: unless-stopped + postgres: + image: "postgres:14" + 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 + + geth: + image: "matterlabs/geth:latest" + logging: + driver: none + ports: + - "8545:8545" + - "8546:8546" + volumes: + - geth:/var/lib/geth/data + + zksync: + stdin_open: true + tty: true + image: matterlabs/local-node:latest2.0 + depends_on: + postgres: + condition: service_healthy + geth: + condition: service_started + ports: + - "3050:3050" # JSON RPC HTTP port + - "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_URL=postgres://postgres:postgres@postgres:5432/zksync_local + - ETH_CLIENT_WEB3_URL=http://geth:8545 + healthcheck: + test: "curl -H \"Content-Type: application/json\" -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":67}' 127.0.0.1:3050 || exit 1" + interval: 5s + timeout: 5s + retries: 120 + restart: unless-stopped + volumes: geth: postgres: