Sistema completo para monitoreo y gestion de flotas de vehiculos con: - Backend FastAPI con PostgreSQL/TimescaleDB - Frontend React con TypeScript y TailwindCSS - App movil React Native con Expo - Soporte para dispositivos GPS, Meshtastic y celulares - Video streaming en vivo con MediaMTX - Geocercas, alertas, viajes y reportes - Autenticacion JWT y WebSockets en tiempo real Documentacion completa y guias de usuario incluidas.
59 lines
1.2 KiB
Desktop File
59 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Sistema de Flotillas - Frontend Web
|
|
Documentation=https://github.com/tuorganizacion/flotillas
|
|
After=network.target flotillas-api.service
|
|
Wants=flotillas-api.service
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=root
|
|
Group=root
|
|
WorkingDirectory=/opt/flotillas/frontend
|
|
|
|
# Cargar variables de entorno
|
|
EnvironmentFile=/opt/flotillas/.env
|
|
|
|
# Comando de inicio usando 'serve' para servir archivos estaticos
|
|
# Opcion 1: Usando serve (recomendado para SPA React/Vue)
|
|
ExecStart=/usr/bin/serve \
|
|
-s dist \
|
|
-l 3000 \
|
|
--no-clipboard \
|
|
--single
|
|
|
|
# Opcion 2: Si usas Next.js en modo standalone
|
|
# ExecStart=/usr/bin/node /opt/flotillas/frontend/.next/standalone/server.js
|
|
|
|
# Opcion 3: Si prefieres usar Node directamente
|
|
# ExecStart=/usr/bin/npx serve -s dist -l 3000
|
|
|
|
# Reinicio automatico
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
# Timeouts
|
|
TimeoutStartSec=30
|
|
TimeoutStopSec=30
|
|
|
|
# Variables de entorno adicionales
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=3000
|
|
|
|
# Limites
|
|
LimitNOFILE=65535
|
|
|
|
# Seguridad
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/flotillas
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=flotillas-web
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|