Simplify BRouter healthcheck to port liveness; add routing wait in CI

The routing probe healthcheck was too strict — BRouter is up but may
not have the segment loaded yet, causing all probes to fail. Use a
simple liveness check (curl exit 0 when server responds on any code)
so --wait unblocks as soon as the server is up. Add an explicit
routing readiness wait step in CI that actually confirms a route can
be computed before running E2E tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-17 21:57:55 +02:00
parent 4d0a865437
commit 134cf4ccf1
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
2 changed files with 12 additions and 5 deletions

View file

@ -209,6 +209,13 @@ jobs:
env:
BROUTER_URL: http://localhost:17777
- name: Wait for BRouter routing
run: |
for i in $(seq 1 30); do
curl -sf 'http://localhost:17777/brouter?lonlats=13.4,52.5|13.5,52.5&profile=trekking&format=geojson' > /dev/null 2>&1 && break
sleep 3
done
- name: Push database schema
run: pnpm db:push

View file

@ -24,11 +24,11 @@ services:
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: 18
start_period: 30s
test: ["CMD-SHELL", "curl -s http://localhost:17777/ > /dev/null 2>&1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 10s
prometheus:
image: prom/prometheus:latest