Files
maps-saas/setup_map2.sh
T
2026-04-13 20:02:57 +03:00

35 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# setup_map2.sh - Automated setup for the isolated Map-2 environment
# إعداد بيئة الخرائط الثانية المعزولة بالكامل
echo "🚀 Starting Map-2 Environment Setup..."
# 1. Create Data Directory on Server
echo "📂 Preparing data directory: infrastructure/osm-data-v2"
mkdir -p infrastructure/osm-data-v2
# 2. Check for PBF file
if [ ! -f "infrastructure/osm-data-v2/map2_enriched.osm.pbf" ]; then
echo "⚠️ No map2_enriched.osm.pbf found."
echo "💡 Copying existing master_map as a starting point..."
cp infrastructure/osm-data/master_map.osm.pbf infrastructure/osm-data-v2/map2_enriched.osm.pbf
fi
# 3. Spin up the containers
echo "🏗️ Starting Map-2 Stack (DB, Redis, Tiles, Routing)..."
docker compose -f docker-compose.map2.yml up -d
echo "✅ Map-2 is being provisioned."
echo "------------------------------------------------"
echo "Ports used:"
echo " - Martin (Tiles): 3203"
echo " - Database: 5433"
echo " - Routing: 8990"
echo " - Redis: 6382"
echo "------------------------------------------------"
echo "Intelligence Roadmap:"
echo "1. Run Overture downloader (Next step)"
echo "2. Inject Arabic names via Overpass API"
echo "3. Connect Martin to the new DB"