# ═══════════════════════════════════════════════════════════════════════════════ # INVENTARIO DE PRODUCCION - NEXUS WORKSPACE # ═══════════════════════════════════════════════════════════════════════════════ # # Version: 1.0.0 # Fecha: 2026-01-04 # Responsable: @PERFIL_PRODUCTION_MANAGER # Proposito: Registro centralizado de ambientes productivos y staging # # ═══════════════════════════════════════════════════════════════════════════════ version: "1.0.0" fecha_actualizacion: "2026-01-04" responsable: "@PERFIL_PRODUCTION_MANAGER" # ───────────────────────────────────────────────────────────────────────────────── # SERVIDORES DE PRODUCCION # ───────────────────────────────────────────────────────────────────────────────── servidores: produccion: # Servidor principal VPS vps_principal: proveedor: "Contabo" tipo: "VPS" ubicacion: "EU" specs: cpu: "6 vCPU" ram: "16 GB" storage: "400 GB SSD" ip_publica: "${PROD_SERVER_IP}" # Definir en .env seguro acceso_ssh: puerto: 22 usuario: "deploy" metodo: "SSH Key" servicios: - nombre: "nginx" puerto: 80 estado: "activo" - nombre: "nginx-ssl" puerto: 443 estado: "activo" monitoreo: uptime_robot: true prometheus_node_exporter: true # Base de datos produccion db_produccion: tipo: "PostgreSQL" version: "15" ubicacion: "mismo VPS o servicio gestionado" puerto: 5432 ssl_mode: "require" backup: frecuencia: "diario" retencion: "30 dias" ubicacion: "S3/Backblaze" staging: vps_staging: proveedor: "Contabo" tipo: "VPS" ubicacion: "EU" specs: cpu: "4 vCPU" ram: "8 GB" storage: "200 GB SSD" ip_publica: "${STAGING_SERVER_IP}" acceso_ssh: puerto: 22 usuario: "deploy" metodo: "SSH Key" # ───────────────────────────────────────────────────────────────────────────────── # PROYECTOS DESPLEGADOS # ───────────────────────────────────────────────────────────────────────────────── proyectos: gamilit: estado_produccion: "activo" dominios: produccion: - "gamilit.com" - "app.gamilit.com" - "api.gamilit.com" staging: - "staging.gamilit.com" - "api-staging.gamilit.com" componentes: frontend: tecnologia: "React (Vite build)" deploy_path: "/var/www/gamilit/frontend" servido_por: "nginx" puerto_interno: "-" # static files backend: tecnologia: "NestJS" deploy_path: "/var/www/gamilit/backend" proceso: "PM2" puerto_interno: 3006 database: nombre: "gamilit_platform" schema_principal: "public" schemas_adicionales: - "auth_management" - "gamification_system" - "content_management" - "user_management" ssl: proveedor: "Let's Encrypt" auto_renovacion: true ultimo_deploy: fecha: "" version: "" commit: "" trading_platform: estado_produccion: "desarrollo" dominios: produccion: [] staging: - "trading-staging.isem.dev" componentes: frontend: tecnologia: "Next.js" puerto_interno: 3200 backend: tecnologia: "Express" puerto_interno: 4000 ml_service: tecnologia: "FastAPI" puerto_interno: 5000 ssl: proveedor: "Let's Encrypt" auto_renovacion: true erp_suite: estado_produccion: "planificado" dominios: produccion: [] staging: [] notas: "Multiples verticales, deployment individual" # ───────────────────────────────────────────────────────────────────────────────── # SERVICIOS DE INFRAESTRUCTURA # ───────────────────────────────────────────────────────────────────────────────── servicios_infra: reverse_proxy: tipo: "nginx" version: "1.24+" configuracion: "/etc/nginx/sites-available/" ssl_certificates: "/etc/letsencrypt/live/" process_manager: tipo: "PM2" version: "5.x" config_file: "ecosystem.config.js" logs: "/var/log/pm2/" contenedores: tipo: "Docker" version: "24.x" compose_version: "2.x" registry: "ghcr.io/isem" # o Docker Hub ci_cd: tipo: "Jenkins" url: "https://jenkins.isem.dev" jobs: - "gamilit-deploy" - "trading-platform-deploy" # ───────────────────────────────────────────────────────────────────────────────── # MONITOREO # ───────────────────────────────────────────────────────────────────────────────── monitoreo: uptime: servicio: "UptimeRobot" endpoints_monitoreados: - url: "https://gamilit.com" intervalo: "5min" alerta: "email,slack" - url: "https://api.gamilit.com/health" intervalo: "5min" alerta: "email,slack" metricas: prometheus: url: "http://localhost:9090" retencion: "15d" grafana: url: "http://localhost:9091" dashboards: - "Node Exporter - Server Metrics" - "PostgreSQL - Database Metrics" - "Nginx - Request Metrics" logs: centralizacion: "PM2 logs + rotacion" retencion: "7 dias" ubicacion: "/var/log/" # ───────────────────────────────────────────────────────────────────────────────── # BACKUPS # ───────────────────────────────────────────────────────────────────────────────── backups: base_de_datos: frecuencia: "diario 03:00 UTC" herramienta: "pg_dump" destino: "S3/Backblaze" retencion: "30 dias" script: "/opt/scripts/backup-db.sh" archivos: frecuencia: "semanal" herramienta: "rsync/rclone" destino: "S3/Backblaze" incluye: - "/var/www/*/uploads" - "/etc/nginx/sites-available" - "/home/deploy/.pm2" verificacion: restore_test: "mensual" ultimo_test: "" resultado: "" # ───────────────────────────────────────────────────────────────────────────────── # SEGURIDAD # ───────────────────────────────────────────────────────────────────────────────── seguridad: firewall: tipo: "ufw" reglas: - "22/tcp ALLOW from {office_ip}" - "80/tcp ALLOW" - "443/tcp ALLOW" - "5432/tcp DENY from any" # Solo local ssh: password_auth: false root_login: false llaves_autorizadas: - "deploy@workstation" - "ci-cd@jenkins" ssl: minimo_version: "TLSv1.2" ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:..." hsts: true secretos: gestion: "archivos .env + permisos restrictivos" rotacion: "trimestral" referencia: "@PERFIL_SECRETS_MANAGER" # ───────────────────────────────────────────────────────────────────────────────── # PROCEDIMIENTOS # ───────────────────────────────────────────────────────────────────────────────── procedimientos: deploy: manual: pasos: - "ssh deploy@servidor" - "cd /var/www/{proyecto}" - "git pull origin main" - "npm install --production" - "npm run build" - "pm2 reload ecosystem.config.js" automatizado: trigger: "merge a main" pipeline: "Jenkins" aprobacion: "requerida para produccion" rollback: metodo: "git checkout + pm2 reload" tiempo_estimado: "< 5 minutos" script: "/opt/scripts/rollback.sh" escalamiento: horizontal: "no configurado (single VPS)" vertical: "upgrade de plan Contabo" # ───────────────────────────────────────────────────────────────────────────────── # CONTACTOS Y ESCALACION # ───────────────────────────────────────────────────────────────────────────────── contactos: primario: nombre: "DevOps Lead" email: "${DEVOPS_EMAIL}" telefono: "${DEVOPS_PHONE}" secundario: nombre: "Tech Leader" email: "${TECH_LEAD_EMAIL}" proveedor: contabo: soporte: "https://contabo.com/support" ticket: "portal web" # ═══════════════════════════════════════════════════════════════════════════════ # NOTAS # ═══════════════════════════════════════════════════════════════════════════════ notas: - "Variables ${...} deben definirse en archivo seguro o vault" - "Este inventario debe actualizarse con cada cambio de infraestructura" - "Revisar mensualmente para verificar vigencia" - "Ultimo review: 2026-01-04" # ═══════════════════════════════════════════════════════════════════════════════ # FIN DE INVENTARIO # ═══════════════════════════════════════════════════════════════════════════════