Add local dev setup, fix BRouter Dockerfile, archive change (#12)

This commit is contained in:
Ullrich Schäfer 2026-03-23 00:11:43 +01:00 committed by GitHub
parent 2d02ae3f9e
commit 52b2baaf58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 329 additions and 9 deletions

View file

@ -0,0 +1,21 @@
#!/bin/bash
set -euo pipefail
# Download a minimal BRouter segment for local development.
# E10_N50 covers the Berlin area (~124MB) — enough for route testing.
VOLUME_NAME="trails-cool_brouter_segments"
SEGMENT="E10_N50.rd5"
URL="https://brouter.de/brouter/segments4/${SEGMENT}"
# Check if segment already exists in the Docker volume
if docker run --rm -v "${VOLUME_NAME}:/data" alpine test -f "/data/${SEGMENT}" 2>/dev/null; then
echo "✓ Segment ${SEGMENT} already exists, skipping download"
exit 0
fi
echo "Downloading ${SEGMENT} (~124MB) for local development..."
docker run --rm -v "${VOLUME_NAME}:/data" alpine/curl \
-L -o "/data/${SEGMENT}" "${URL}"
echo "✓ Segment downloaded to Docker volume ${VOLUME_NAME}"