feat: Complete ATLAS system installation and API fixes
## 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>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Deploy - Sistema de ADAN
|
||||
# Deploy - Sistema de ATLAS
|
||||
|
||||
Scripts y configuraciones para desplegar el sistema de adan en produccion.
|
||||
Scripts y configuraciones para desplegar el sistema de atlas en produccion.
|
||||
|
||||
## Estructura
|
||||
|
||||
@@ -17,8 +17,8 @@ deploy/
|
||||
│ ├── status.sh # Estado del sistema
|
||||
│ └── logs.sh # Visor de logs
|
||||
├── services/ # Servicios systemd
|
||||
│ ├── adan-api.service
|
||||
│ ├── adan-web.service
|
||||
│ ├── atlas-api.service
|
||||
│ ├── atlas-web.service
|
||||
│ ├── mediamtx.service
|
||||
│ └── cloudflared.service
|
||||
├── cloudflare/ # Configuracion tunnel
|
||||
@@ -44,15 +44,15 @@ deploy/
|
||||
|
||||
```bash
|
||||
# Crear VM automaticamente
|
||||
./deploy/proxmox/vm-setup.sh --vmid 200 --name adan --memory 8192
|
||||
./deploy/proxmox/vm-setup.sh --vmid 200 --name atlas --memory 8192
|
||||
```
|
||||
|
||||
### 2. En Ubuntu
|
||||
|
||||
```bash
|
||||
# Clonar repositorio
|
||||
git clone https://github.com/tuorg/adan.git /opt/adan
|
||||
cd /opt/adan
|
||||
git clone https://github.com/tuorg/atlas.git /opt/atlas
|
||||
cd /opt/atlas
|
||||
|
||||
# Ejecutar instalador
|
||||
sudo ./deploy/scripts/install.sh
|
||||
@@ -101,18 +101,18 @@ cloudflared tunnel login
|
||||
|
||||
3. Crear tunnel:
|
||||
```bash
|
||||
cloudflared tunnel create adan
|
||||
cloudflared tunnel create atlas
|
||||
```
|
||||
|
||||
4. Configurar DNS:
|
||||
```bash
|
||||
cloudflared tunnel route dns adan adan.tudominio.com
|
||||
cloudflared tunnel route dns atlas atlas.tudominio.com
|
||||
```
|
||||
|
||||
5. Copiar config y habilitar servicio:
|
||||
```bash
|
||||
mkdir -p /etc/cloudflared
|
||||
cp /opt/adan/deploy/cloudflare/config.yml /etc/cloudflared/
|
||||
cp /opt/atlas/deploy/cloudflare/config.yml /etc/cloudflared/
|
||||
systemctl enable cloudflared
|
||||
systemctl start cloudflared
|
||||
```
|
||||
@@ -144,7 +144,7 @@ Backups automaticos: diariamente a las 3 AM (configurado por install.sh)
|
||||
./deploy/scripts/restore.sh --latest
|
||||
|
||||
# Restaurar backup especifico
|
||||
./deploy/scripts/restore.sh --db /var/backups/adan/daily/adan_20240115_db.sql.gz
|
||||
./deploy/scripts/restore.sh --db /var/backups/atlas/daily/atlas_20240115_db.sql.gz
|
||||
```
|
||||
|
||||
### Actualizar
|
||||
@@ -164,8 +164,8 @@ Backups automaticos: diariamente a las 3 AM (configurado por install.sh)
|
||||
|
||||
| Servicio | Puerto | Descripcion |
|
||||
|----------|--------|-------------|
|
||||
| adan-api | 8000 | Backend FastAPI |
|
||||
| adan-web | 3000 | Frontend |
|
||||
| atlas-api | 8000 | Backend FastAPI |
|
||||
| atlas-web | 3000 | Frontend |
|
||||
| postgresql | 5432 | Base de datos |
|
||||
| redis | 6379 | Cache |
|
||||
| traccar | 5055 | GPS Server |
|
||||
@@ -176,17 +176,17 @@ Backups automaticos: diariamente a las 3 AM (configurado por install.sh)
|
||||
|
||||
```bash
|
||||
# Estado
|
||||
systemctl status adan-api
|
||||
systemctl status atlas-api
|
||||
|
||||
# Reiniciar
|
||||
systemctl restart adan-api
|
||||
systemctl restart atlas-api
|
||||
|
||||
# Logs
|
||||
journalctl -u adan-api -f
|
||||
journalctl -u atlas-api -f
|
||||
|
||||
# Habilitar/Deshabilitar
|
||||
systemctl enable adan-api
|
||||
systemctl disable adan-api
|
||||
systemctl enable atlas-api
|
||||
systemctl disable atlas-api
|
||||
```
|
||||
|
||||
## Seguridad
|
||||
@@ -217,13 +217,13 @@ systemctl disable adan-api
|
||||
|
||||
```bash
|
||||
# Ver logs
|
||||
journalctl -u adan-api -n 100
|
||||
journalctl -u atlas-api -n 100
|
||||
|
||||
# Verificar puerto
|
||||
ss -tlnp | grep 8000
|
||||
|
||||
# Verificar base de datos
|
||||
psql -h localhost -U adan -d adan -c "SELECT 1"
|
||||
psql -h localhost -U atlas -d atlas -c "SELECT 1"
|
||||
```
|
||||
|
||||
### Traccar no recibe datos
|
||||
@@ -243,19 +243,19 @@ nc -zv localhost 5055
|
||||
|
||||
```bash
|
||||
# Ver uso de memoria por servicio
|
||||
systemctl status adan-api --no-pager | grep Memory
|
||||
systemctl status atlas-api --no-pager | grep Memory
|
||||
|
||||
# Reducir workers de API
|
||||
# Editar /etc/systemd/system/adan-api.service
|
||||
# Editar /etc/systemd/system/atlas-api.service
|
||||
# Cambiar --workers 4 a --workers 2
|
||||
systemctl daemon-reload
|
||||
systemctl restart adan-api
|
||||
systemctl restart atlas-api
|
||||
```
|
||||
|
||||
## Credenciales
|
||||
|
||||
Las credenciales se generan durante la instalacion y se guardan en:
|
||||
- `/root/adan-credentials.txt`
|
||||
- `/root/atlas-credentials.txt`
|
||||
|
||||
**IMPORTANTE**: Guardar en lugar seguro y eliminar el archivo despues.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user