Files
trenes/.env.example

57 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

# ============================================
# Configuración del Sistema de Tracking de Trenes
# ============================================
# Copiar a .env y configurar según el entorno
# ===========================================
# DESARROLLO LOCAL
# ===========================================
# --- Base de Datos PostgreSQL ---
POSTGRES_USER=trenes
POSTGRES_PASSWORD=trenes_password_change_me
POSTGRES_DB=trenes
# --- Redis ---
REDIS_PASSWORD=redis_password_change_me
# --- Backend API ---
JWT_SECRET=jwt_secret_change_me_min_32_chars
CORS_ORIGINS=http://localhost,http://localhost:5173,http://localhost:3000
LOG_LEVEL=info
# --- Frontend ---
# IMPORTANTE: Para desarrollo local
VITE_API_URL=http://localhost/api
VITE_WS_URL=http://localhost
# --- Worker ---
GTFS_RT_URL=https://gtfsrt.renfe.com/vehicle_positions.pb
POLLING_INTERVAL=30000
# --- Configuración de Entorno ---
NODE_ENV=development
# ===========================================
# PRODUCCIÓN (ejemplo para trenes.millaguie.net)
# ===========================================
# Descomentar y ajustar para producción:
#
# POSTGRES_USER=trenes
# POSTGRES_PASSWORD=<contraseña_segura_generada>
# POSTGRES_DB=trenes
#
# JWT_SECRET=<secreto_jwt_largo_y_aleatorio>
#
# # IMPORTANTE: CORS_ORIGINS debe incluir tu dominio
# CORS_ORIGINS=https://tudominio.com
#
# # IMPORTANTE sobre VITE_WS_URL:
# # - Socket.io añade /socket.io/ automáticamente
# # - NO incluir /ws o /socket.io en la URL
# # - Usar https:// (no wss://), Socket.io maneja el protocolo
# VITE_API_URL=https://tudominio.com/api
# VITE_WS_URL=https://tudominio.com
#
# NODE_ENV=production