Skip to content

Commit a80aede

Browse files
committed
enhance(docker): add healthcheck to execution service and use service_healthy condition in node depends_on
1 parent 68a894f commit a80aede

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,21 @@ services:
1515
- ${HOST_DATA_DIR}:/data
1616
env_file:
1717
- ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet
18+
healthcheck:
19+
test: ["CMD", "curl", "-f", "http://localhost:6060"] # Controlla l'endpoint metrics interno (6060)
20+
interval: 30s
21+
timeout: 10s
22+
retries: 5
23+
start_period: 60s # dà tempo all'execution client di avviarsi
24+
1825
node:
1926
build:
2027
context: .
2128
dockerfile: ${CLIENT:-geth}/Dockerfile
2229
restart: unless-stopped
2330
depends_on:
24-
- execution
31+
execution:
32+
condition: service_healthy # node parte SOLO quando execution è healthy
2533
ports:
2634
- "7545:8545" # RPC
2735
- "9222:9222" # P2P TCP

0 commit comments

Comments
 (0)