Add BRouter healthcheck so compose --wait blocks until routing is ready

Without a healthcheck, --wait considers BRouter healthy as soon as the
container starts, before it has loaded segments and opened its port.
The healthcheck probes the routing endpoint directly, matching the old
manual curl loop in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-17 21:02:02 +02:00
parent a2d125922e
commit 8fd3dda8c6
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -23,6 +23,12 @@ services:
- "17777:17777"
volumes:
- brouter_segments:/data/segments
healthcheck:
test: ["CMD-SHELL", "curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null"]
interval: 10s
timeout: 10s
retries: 12
start_period: 30s
prometheus:
image: prom/prometheus:latest