Skip to content

Commit

Permalink
fix: new
Browse files Browse the repository at this point in the history
  • Loading branch information
olehbairak committed Jan 24, 2024
1 parent ae4c49e commit cd2b510
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cd2b510

Please sign in to comment.