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 @@
|
||||
#!/bin/bash
|
||||
# ============================================
|
||||
# Sistema de ADAN - Script de Backup
|
||||
# Sistema de ATLAS - Script de Backup
|
||||
# ============================================
|
||||
# Realiza backup de base de datos y configuracion
|
||||
#
|
||||
@@ -27,8 +27,8 @@ NC='\033[0m'
|
||||
# ---------------------------------------------
|
||||
# Variables de Configuracion
|
||||
# ---------------------------------------------
|
||||
INSTALL_DIR="${INSTALL_DIR:-/opt/adan}"
|
||||
BACKUP_DIR="${BACKUP_DIR:-/var/backups/adan}"
|
||||
INSTALL_DIR="${INSTALL_DIR:-/opt/atlas}"
|
||||
BACKUP_DIR="${BACKUP_DIR:-/var/backups/atlas}"
|
||||
RETENTION_DAYS="${BACKUP_RETENTION_DAYS:-7}"
|
||||
|
||||
# Cargar variables de entorno
|
||||
@@ -39,8 +39,8 @@ fi
|
||||
# Base de datos
|
||||
DB_HOST="${POSTGRES_HOST:-localhost}"
|
||||
DB_PORT="${POSTGRES_PORT:-5432}"
|
||||
DB_NAME="${POSTGRES_DB:-adan}"
|
||||
DB_USER="${POSTGRES_USER:-adan}"
|
||||
DB_NAME="${POSTGRES_DB:-atlas}"
|
||||
DB_USER="${POSTGRES_USER:-atlas}"
|
||||
DB_PASSWORD="${POSTGRES_PASSWORD:-}"
|
||||
|
||||
# S3 (opcional)
|
||||
@@ -50,7 +50,7 @@ S3_ENDPOINT="${S3_ENDPOINT:-https://s3.amazonaws.com}"
|
||||
|
||||
# Timestamp para este backup
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
BACKUP_NAME="adan_${TIMESTAMP}"
|
||||
BACKUP_NAME="atlas_${TIMESTAMP}"
|
||||
|
||||
# Flags
|
||||
FULL_BACKUP=false
|
||||
@@ -228,8 +228,8 @@ backup_config() {
|
||||
"$INSTALL_DIR/deploy"
|
||||
"/opt/traccar/conf/traccar.xml"
|
||||
"/opt/mediamtx/mediamtx.yml"
|
||||
"/etc/mosquitto/conf.d/adan.conf"
|
||||
"/etc/systemd/system/adan-*.service"
|
||||
"/etc/mosquitto/conf.d/atlas.conf"
|
||||
"/etc/systemd/system/atlas-*.service"
|
||||
"/etc/systemd/system/mediamtx.service"
|
||||
)
|
||||
|
||||
@@ -290,7 +290,7 @@ rotate_backups() {
|
||||
while IFS= read -r -d '' file; do
|
||||
rm -f "$file"
|
||||
((deleted++))
|
||||
done < <(find "$BACKUP_DIR/daily" -type f -name "adan_*.gz" -mtime +${RETENTION_DAYS} -print0 2>/dev/null)
|
||||
done < <(find "$BACKUP_DIR/daily" -type f -name "atlas_*.gz" -mtime +${RETENTION_DAYS} -print0 2>/dev/null)
|
||||
|
||||
if [[ $deleted -gt 0 ]]; then
|
||||
log_info "Eliminados $deleted backups antiguos"
|
||||
@@ -356,7 +356,7 @@ create_backup_index() {
|
||||
|
||||
# Cabecera
|
||||
cat > "$index_file" <<EOF
|
||||
# Indice de Backups - Sistema de ADAN
|
||||
# Indice de Backups - Sistema de ATLAS
|
||||
# Generado: $(date)
|
||||
# Retencion: ${RETENTION_DAYS} dias
|
||||
#
|
||||
@@ -426,7 +426,7 @@ send_notification() {
|
||||
curl -s -X POST \
|
||||
"https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
|
||||
-d chat_id="${TELEGRAM_CHAT_ID}" \
|
||||
-d text="${emoji} Backup ADAN: ${message}" \
|
||||
-d text="${emoji} Backup ATLAS: ${message}" \
|
||||
> /dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user