Skip to content

Commit 9a67ab6

Browse files
deployment: wait for node healthcheck before starting the simulator
1 parent f6051eb commit 9a67ab6

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

deployments/monitoring/local/docker-compose.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ x-sequencer-node: &sequencer_node
2424
- config:/config
2525
networks:
2626
- sequencer-network
27+
# Mark a node healthy once its HTTP gateway (8081) accepts connections, so the simulator waits
28+
# for it instead of racing the gateway bind. Uses bash /dev/tcp since the image has no curl.
29+
healthcheck:
30+
test: ["CMD", "bash", "-c", "</dev/tcp/localhost/8081"]
31+
interval: 5s
32+
timeout: 3s
33+
retries: 30
34+
start_period: 10s
2735

2836
services:
2937
prometheus:
@@ -172,7 +180,8 @@ services:
172180

173181
sequencer_simulator:
174182
depends_on:
175-
- sequencer-node-0
183+
sequencer-node-0:
184+
condition: service_healthy
176185
build:
177186
context: ${SEQUENCER_ROOT_DIR}
178187
dockerfile: ${SEQUENCER_ROOT_DIR}/deployments/images/sequencer/simulator.Dockerfile

0 commit comments

Comments
 (0)