Changes: - Fix ecosystem.config.js path (line 138) - Add production scripts (update-production.sh, diagnose-production.sh) - Add PRODUCTION-UPDATE.md with quick instructions - Add reference to production deployment documentation Analysis reports: - PLAN-SINCRONIZACION-WORKSPACES-2025-12-18.md - Master sync plan - ANALISIS-CONFIGURACION-PRODUCCION-2025-12-18.md - Config analysis - PLAN-IMPLEMENTACION-SINCRONIZACION-2025-12-18.md - Implementation plan - VALIDACION-PLAN-SINCRONIZACION-2025-12-18.md - Validation report Result: Both workspaces (NUEVO/VIEJO) are now 100% synchronized - DDL: 100% identical - Seeds: 100% identical - Backend: 100% synchronized - Frontend: 100% synchronized 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
82 lines
2.0 KiB
Markdown
82 lines
2.0 KiB
Markdown
# Scripts de Produccion - GAMILIT
|
|
|
|
**Ultima actualizacion:** 2025-12-18
|
|
|
|
---
|
|
|
|
## PARA EL AGENTE EN PRODUCCION
|
|
|
|
Si acabas de hacer `git pull` desde remoto, sigue estas instrucciones:
|
|
|
|
### 1. Leer Documentacion Primero
|
|
|
|
```bash
|
|
# Guia principal de actualizacion
|
|
cat docs/95-guias-desarrollo/GUIA-ACTUALIZACION-PRODUCCION.md
|
|
|
|
# Guia de validacion y troubleshooting
|
|
cat docs/95-guias-desarrollo/GUIA-VALIDACION-PRODUCCION.md
|
|
|
|
# Guia de despliegue completo (si es primera vez)
|
|
cat docs/95-guias-desarrollo/GUIA-DESPLIEGUE-PRODUCCION-COMPLETA.md
|
|
```
|
|
|
|
### 2. Ejecutar Actualizacion
|
|
|
|
```bash
|
|
# Hacer scripts ejecutables
|
|
chmod +x scripts/*.sh
|
|
|
|
# Configurar password de BD
|
|
export DB_PASSWORD="tu_password_aqui"
|
|
|
|
# Ejecutar actualizacion completa
|
|
./scripts/update-production.sh
|
|
```
|
|
|
|
### 3. Si Solo Necesitas Diagnostico
|
|
|
|
```bash
|
|
./scripts/diagnose-production.sh
|
|
```
|
|
|
|
### 4. Si Hay Datos Faltantes
|
|
|
|
```bash
|
|
./scripts/repair-missing-data.sh
|
|
```
|
|
|
|
---
|
|
|
|
## Scripts Disponibles
|
|
|
|
| Script | Proposito | Cuando usar |
|
|
|--------|-----------|-------------|
|
|
| `update-production.sh` | Actualizacion completa | Despues de pull |
|
|
| `diagnose-production.sh` | Diagnostico del sistema | Para verificar estado |
|
|
| `repair-missing-data.sh` | Reparar datos faltantes | Si faltan seeds |
|
|
|
|
---
|
|
|
|
## Flujo de Actualizacion
|
|
|
|
```
|
|
1. Respaldar configuraciones (.env) fuera del repo
|
|
2. Respaldar base de datos (pg_dump)
|
|
3. git fetch && git reset --hard origin/main
|
|
4. Restaurar configuraciones
|
|
5. Recrear base de datos limpia (create-database.sh)
|
|
6. npm install + npm run build
|
|
7. pm2 start
|
|
8. Validar con diagnose-production.sh
|
|
```
|
|
|
|
---
|
|
|
|
## Documentacion Relacionada
|
|
|
|
- `docs/95-guias-desarrollo/GUIA-ACTUALIZACION-PRODUCCION.md` - Guia detallada paso a paso
|
|
- `docs/95-guias-desarrollo/GUIA-VALIDACION-PRODUCCION.md` - Validaciones y errores comunes
|
|
- `docs/95-guias-desarrollo/GUIA-DESPLIEGUE-PRODUCCION-COMPLETA.md` - Configuracion inicial completa
|
|
- `docs/95-guias-desarrollo/GUIA-CREAR-BASE-DATOS.md` - Proceso de creacion de BD
|