Files
Laca-City/docker-compose.yml
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

155 lines
3.6 KiB
YAML

version: '3.8'
services:
# Frontend - Next.js Application
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=http://localhost:3001
- NEXT_PUBLIC_MAP_TILES_URL=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
- NEXT_PUBLIC_VALHALLA_URL=http://localhost:8002
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
networks:
- parking-network
# Backend - NestJS API
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "3001:3001"
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://parking_user:parking_pass@postgres:5432/parking_db
- REDIS_URL=redis://redis:6379
- VALHALLA_URL=http://valhalla:8002
- JWT_SECRET=your-development-jwt-secret-change-in-production
- JWT_EXPIRATION=24h
volumes:
- ./backend:/app
- /app/node_modules
- /app/dist
depends_on:
- postgres
- redis
- valhalla
networks:
- parking-network
# PostgreSQL Database with PostGIS
postgres:
image: postgis/postgis:15-3.3
environment:
- POSTGRES_DB=parking_db
- POSTGRES_USER=parking_user
- POSTGRES_PASSWORD=parking_pass
- POSTGRES_INITDB_ARGS="--encoding=UTF-8"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/database/init:/docker-entrypoint-initdb.d
networks:
- parking-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U parking_user -d parking_db"]
interval: 30s
timeout: 10s
retries: 3
# Redis Cache
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- parking-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
# Valhalla Routing Engine
valhalla:
build:
context: ./valhalla
dockerfile: Dockerfile
ports:
- "8002:8002"
volumes:
- valhalla_data:/data
- ./valhalla/custom_files:/custom_files
environment:
- VALHALLA_CONFIG=/valhalla.json
networks:
- parking-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/status"]
interval: 60s
timeout: 30s
retries: 3
start_period: 300s # Wait 5 minutes for initial setup
# Optional: pgAdmin for database management
pgadmin:
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=admin@parking.local
- PGADMIN_DEFAULT_PASSWORD=admin123
- PGADMIN_CONFIG_SERVER_MODE=False
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
networks:
- parking-network
profiles:
- tools # Only start with: docker-compose --profile tools up
# Optional: Redis Commander for cache management
redis-commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
depends_on:
- redis
networks:
- parking-network
profiles:
- tools # Only start with: docker-compose --profile tools up
volumes:
postgres_data:
driver: local
redis_data:
driver: local
valhalla_data:
driver: local
pgadmin_data:
driver: local
networks:
parking-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16