Skip to content

Commit

Permalink
chore: fix docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyl-ivanchuk committed May 22, 2024
1 parent c094d99 commit 11594b1
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 17 deletions.
39 changes: 22 additions & 17 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ services:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=block-explorer

geth:
image: "matterlabs/geth:latest"
logging:
driver: none
ports:
- "8545:8545"
- "8546:8546"
reth:
restart: always
image: "ghcr.io/paradigmxyz/reth:v0.2.0-beta.2"
volumes:
- geth:/var/lib/geth/data
- 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
Expand All @@ -96,28 +99,30 @@ services:
depends_on:
postgres:
condition: service_healthy
geth:
reth:
condition: service_started
ports:
- "3050:3050" # JSON RPC HTTP port
- "3051:3051" # JSON RPC WS port
- 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_URL=postgres://postgres:postgres@postgres:5432/zksync_local
- ETH_CLIENT_WEB3_URL=http://geth:8545
- 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 -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
test: curl --fail http://localhost:3071/health || exit 1
interval: 10s
timeout: 5s
retries: 300
retries: 60
start_period: 30s
restart: unless-stopped

volumes:
geth:
reth:
postgres:
zksync-config:
zksync-data:
86 changes: 86 additions & 0 deletions reth_chaindata/reth_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"config": {
"chainId": 9,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"daoForkBlock": 0,
"frontierBlock": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"muirGlacierBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"terminalTotalDifficulty": "0x0",
"mergeNetsplitBlock": 0,
"shanghaiTime": 0,
"cancunTime": 0,
"clique": {
"period": 0,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5ca9158b",
"gasLimit": "0x1c9c380",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"8a91dc2d28b689474298d91899f0c1baf62cb85b": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"de03a0b5963f75f1c8485b355ff6d30f3093bde7": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"52312AD6f01657413b2eaE9287f6B9ADaD93D5FE": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"36615Cf349d7F6344891B1e7CA7C72883F5dc049": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"a61464658AfeAf65CccaaFD3a512b69A83B77618": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"0D43eB5B8a47bA8900d84AA36656c92024e9772e": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"A13c10C0D5bd6f79041B9835c63f91de35A15883": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"8002cD98Cfb563492A6fB3E7C8243b7B9Ad4cc92": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"4F9133D1d3F50011A6859807C837bdCB31Aaab13": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"bd29A1B981925B94eEc5c4F1125AF02a2Ec4d1cA": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"edB6F5B4aab3dD95C7806Af42881FF12BE7e9daa": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"e706e60ab5Dc512C36A4646D719b889F398cbBcB": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"E90E12261CCb0F3F7976Ae611A29e84a6A85f424": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
},
"e706e60ab5dc512c36a4646d719b889f398cbbcb": {
"balance": "0x4B3B4CA85A86C47A098A224000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": 1,
"excessBlobGas": "0x0",
"blobGasUsed": 0
}

0 comments on commit 11594b1

Please sign in to comment.