Skip to content

Commit e5c3cd7

Browse files
authored
Update docker-compose.yml
Added Docker healthchecks so the execution and node services are marked healthy only after their HTTP endpoints respond, improving reliability for local setups and CI.
1 parent 97fb39a commit e5c3cd7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ 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-SHELL", "wget -qO- http://localhost:6060/debug/pprof/ > /dev/null 2>&1 || exit 1"]
20+
interval: 30s
21+
timeout: 5s
22+
retries: 6
23+
start_period: 60s
24+
1825
node:
1926
build:
2027
context: .
@@ -31,3 +38,9 @@ services:
3138
command: ["bash", "./op-node-entrypoint"]
3239
env_file:
3340
- ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet
41+
healthcheck:
42+
test: ["CMD-SHELL", "wget -qO- http://localhost:6060/debug/pprof/ > /dev/null 2>&1 || exit 1"]
43+
interval: 30s
44+
timeout: 5s
45+
retries: 6
46+
start_period: 60s

0 commit comments

Comments
 (0)