maps/backend/scripts/update_all.sh
2026-03-30 10:27:36 +02:00

36 lines
869 B
Bash
Executable file

#!/bin/bash
# scripts/update_all.sh
# Full weekly data update pipeline
set -euo pipefail
LOGFILE="/var/log/maps-update.log"
exec > >(tee -a "$LOGFILE") 2>&1
echo "=== OSM data update started at $(date -u) ==="
# Step 1: Download latest PBF
/app/scripts/01_download.sh
# Step 2: Import tile data
/app/scripts/02_import_tiles.sh
# Step 3: Import POI data
/app/scripts/03_import_pois.sh
# Step 4: Update geocoding index
/app/scripts/04_import_geocoding.sh
# Step 5: Rebuild OSRM routing graphs
/app/scripts/05_import_routing.sh
# Step 6: Rebuild offline packages
/app/scripts/06_build_offline_packages.sh
# Step 7: Flush tile cache in Redis (tiles have changed)
redis-cli -h redis FLUSHDB
# Step 8: Restart services to pick up new data
docker compose restart martin osrm-driving osrm-walking osrm-cycling
echo "=== OSM data update completed at $(date -u) ==="