Pre-seed BRouter volume in CI instead of bind mount override

The bind mount override (docker-compose.ci.yml) failed because file
permissions on the cached segment prevented the entrypoint from seeing
the file, causing a fresh download on every CI run.

Instead: create the named volume and copy the cached segment into it
before compose starts, using alpine with explicit chmod. The entrypoint
then finds the segment and skips the download, so BRouter starts in ~4s
instead of ~2min.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-17 22:44:23 +02:00
parent bea391c9fd
commit 1dcc518242
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
2 changed files with 9 additions and 5 deletions

View file

@ -204,8 +204,16 @@ jobs:
mkdir -p /tmp/brouter-segments
wget -q "https://brouter.de/brouter/segments4/E10_N50.rd5" -O /tmp/brouter-segments/E10_N50.rd5
- name: Pre-seed BRouter segment volume
run: |
docker volume create trails_brouter_segments
docker run --rm \
-v /tmp/brouter-segments:/src:ro \
-v trails_brouter_segments:/dst \
alpine sh -c "cp /src/*.rd5 /dst/ && chmod a+r /dst/*.rd5"
- name: Start services
run: docker compose -f docker-compose.dev.yml -f docker-compose.ci.yml up -d --wait --build
run: docker compose -f docker-compose.dev.yml up -d --wait --build
env:
BROUTER_URL: http://localhost:17777

View file

@ -1,4 +0,0 @@
services:
brouter:
volumes:
- /tmp/brouter-segments:/data/segments