## Backend Changes - Add new API endpoints: combustible, pois, mantenimiento, video, configuracion - Fix vehiculos endpoint to return paginated response with items array - Add /vehiculos/all endpoint for non-paginated list - Add /geocercas/all endpoint - Add /alertas/configuracion GET/PUT endpoints - Add /viajes/activos and /viajes/iniciar endpoints - Add /reportes/stats, /reportes/templates, /reportes/preview endpoints - Add /conductores/all and /conductores/disponibles endpoints - Update router.py to include all new modules ## Frontend Changes - Fix authentication token handling (snake_case vs camelCase) - Update vehiculosApi.listAll to use /vehiculos/all - Fix FuelGauge component usage in Combustible page - Fix chart component exports (named + default exports) - Update API client for proper token refresh ## Infrastructure - Rename services from ADAN to ATLAS - Configure Cloudflare tunnel for atlas.consultoria-as.com - Update systemd service files - Configure PostgreSQL with TimescaleDB - Configure Redis, Mosquitto, Traccar, MediaMTX ## Documentation - Update installation guides - Update API reference - Rename all ADAN references to ATLAS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
136 lines
4.0 KiB
YAML
136 lines
4.0 KiB
YAML
# ============================================
|
|
# Cloudflare Tunnel - Configuracion
|
|
# ============================================
|
|
# Documentacion: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
|
|
#
|
|
# Para usar esta configuracion:
|
|
# 1. Instalar cloudflared: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation
|
|
# 2. Autenticarse: cloudflared tunnel login
|
|
# 3. Crear tunnel: cloudflared tunnel create atlas
|
|
# 4. Obtener el UUID del tunnel y actualizar este archivo
|
|
# 5. Crear registros DNS: cloudflared tunnel route dns atlas atlas.tudominio.com
|
|
# 6. Copiar credenciales a /etc/cloudflared/
|
|
# ============================================
|
|
|
|
# ID del tunnel (reemplazar con tu UUID)
|
|
tunnel: TUNNEL_UUID_AQUI
|
|
|
|
# Archivo de credenciales
|
|
credentials-file: /etc/cloudflared/TUNNEL_UUID_AQUI.json
|
|
|
|
# Configuracion de logging
|
|
loglevel: info
|
|
logfile: /var/log/cloudflared.log
|
|
|
|
# Metricas (opcional)
|
|
metrics: localhost:60123
|
|
|
|
# No auto-actualizar
|
|
no-autoupdate: true
|
|
|
|
# Configuracion de ingress (rutas)
|
|
ingress:
|
|
# ----------------------------------------
|
|
# API Backend - /api/* y /docs
|
|
# ----------------------------------------
|
|
- hostname: atlas.tudominio.com
|
|
path: /api/*
|
|
service: http://localhost:8000
|
|
originRequest:
|
|
connectTimeout: 30s
|
|
noTLSVerify: false
|
|
|
|
- hostname: atlas.tudominio.com
|
|
path: /docs
|
|
service: http://localhost:8000
|
|
|
|
- hostname: atlas.tudominio.com
|
|
path: /redoc
|
|
service: http://localhost:8000
|
|
|
|
- hostname: atlas.tudominio.com
|
|
path: /openapi.json
|
|
service: http://localhost:8000
|
|
|
|
# ----------------------------------------
|
|
# WebSocket - /ws/*
|
|
# ----------------------------------------
|
|
- hostname: atlas.tudominio.com
|
|
path: /ws/*
|
|
service: http://localhost:8000
|
|
originRequest:
|
|
# Importante para WebSocket
|
|
noTLSVerify: false
|
|
# Mantener conexion abierta
|
|
keepAliveConnections: 100
|
|
keepAliveTimeout: 90s
|
|
|
|
# ----------------------------------------
|
|
# Video Streaming - WebRTC/HLS
|
|
# ----------------------------------------
|
|
- hostname: stream.atlas.tudominio.com
|
|
path: /*
|
|
service: http://localhost:8889
|
|
originRequest:
|
|
noTLSVerify: false
|
|
|
|
- hostname: hls.atlas.tudominio.com
|
|
path: /*
|
|
service: http://localhost:8888
|
|
|
|
# ----------------------------------------
|
|
# API de MediaMTX (interno/admin)
|
|
# ----------------------------------------
|
|
- hostname: mediamtx-api.atlas.tudominio.com
|
|
path: /*
|
|
service: http://localhost:9997
|
|
originRequest:
|
|
# Solo acceso interno
|
|
noTLSVerify: false
|
|
|
|
# ----------------------------------------
|
|
# Frontend Web - Todo lo demas
|
|
# ----------------------------------------
|
|
- hostname: atlas.tudominio.com
|
|
service: http://localhost:3000
|
|
originRequest:
|
|
noTLSVerify: false
|
|
|
|
# ----------------------------------------
|
|
# Catch-all (requerido)
|
|
# ----------------------------------------
|
|
- service: http_status:404
|
|
|
|
# ============================================
|
|
# Notas de configuracion
|
|
# ============================================
|
|
#
|
|
# DOMINIOS RECOMENDADOS:
|
|
# - atlas.tudominio.com -> Frontend + API
|
|
# - stream.atlas.tudominio.com -> Video WebRTC
|
|
# - hls.atlas.tudominio.com -> Video HLS
|
|
#
|
|
# INSTALACION RAPIDA CON TOKEN:
|
|
# Si prefieres usar token en lugar de archivo de config:
|
|
# 1. Ir a Cloudflare Zero Trust Dashboard
|
|
# 2. Access -> Tunnels -> Crear tunnel
|
|
# 3. Copiar token
|
|
# 4. Ejecutar: cloudflared tunnel run --token TU_TOKEN
|
|
#
|
|
# PUERTOS EXPUESTOS A TRAVES DEL TUNNEL:
|
|
# - 3000: Frontend (serve)
|
|
# - 8000: Backend API (uvicorn)
|
|
# - 8889: MediaMTX WebRTC
|
|
# - 8888: MediaMTX HLS
|
|
# - 9997: MediaMTX API (admin)
|
|
#
|
|
# PUERTO NO EXPUESTO (acceso directo):
|
|
# - 5055: Traccar GPS (dispositivos GPS se conectan directamente)
|
|
#
|
|
# SEGURIDAD ADICIONAL:
|
|
# Configura Access Policies en Cloudflare Zero Trust para:
|
|
# - Proteger /docs y /redoc (solo administradores)
|
|
# - Proteger mediamtx-api (solo interno)
|
|
# - Requerir autenticacion para rutas sensibles
|
|
# ============================================
|