From 8fd3dda8c68d4de0f2a12862f48ddcdedbb5b1ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 17 May 2026 21:02:02 +0200 Subject: [PATCH] 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 --- docker-compose.dev.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a184d30..21a2391 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -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