From 7dc6e3d522eb16f36a41c67d1451c6781ab56c88 Mon Sep 17 00:00:00 2001 From: Fernando Davila Oyarzabal Date: Mon, 27 Jul 2026 14:52:58 -0600 Subject: [PATCH] Cambiar puerto a 8004 (8003 ocupado en el VPS) --- CLAUDE.md | 4 ++-- Dockerfile | 4 ++-- README.md | 8 ++++---- docker-compose.yml | 2 +- src/main.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 795b757..eb44352 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ leyendo un Google Sheet en tiempo real. NO genera PDFs — solo responde texto. ## Flujo del Sistema ``` WhatsApp → EvolutionAPI (instancia: demo-seguros) - → FastAPI :8003 (este proyecto) + → FastAPI :8004 (este proyecto) → GPT-4o-mini (clasificar intención del mensaje) → Google Sheets (leer datos reales) → Texto estructurado → WhatsApp @@ -17,7 +17,7 @@ WhatsApp → EvolutionAPI (instancia: demo-seguros) - **VPS:** 191.101.233.43 (Hostinger Ubuntu 24.04) - **Panel:** Coolify v4 — http://191.101.233.43:8000 - **EvolutionAPI:** http://evo-r8gs8s848s44ww00cwgkoooo.191.101.233.43.sslip.io:8081 -- **Puerto FastAPI:** 8003 +- **Puerto FastAPI:** 8004 - **Redis:** contenedor `demo-seguros-redis` (aislado del bot de cotizaciones) ## Estructura del Proyecto diff --git a/Dockerfile b/Dockerfile index d1ce916..1a4b73b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY src/ ./src/ -EXPOSE 8003 +EXPOSE 8004 -CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8003"] +CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8004"] diff --git a/README.md b/README.md index 3187238..f40aa20 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Bot de WhatsApp para consulta de vencimientos de pólizas vehiculares. ## Arquitectura ``` -WhatsApp → EvolutionAPI (demo-seguros) → FastAPI :8003 +WhatsApp → EvolutionAPI (demo-seguros) → FastAPI :8004 → GPT-4o-mini → Google Sheets → Respuesta texto → WhatsApp ``` @@ -16,7 +16,7 @@ WhatsApp → EvolutionAPI (demo-seguros) → FastAPI :8003 - [ ] Instancia `demo-seguros` creada en EvolutionAPI con número conectado - [ ] Sheet de seguros compartido con `wk-bot-sheets@wk-bot-489515.iam.gserviceaccount.com` -- [ ] Webhook de EvolutionAPI apuntando a `http://demo-seguros-api:8003/api/v1/webhook` +- [ ] Webhook de EvolutionAPI apuntando a `http://demo-seguros-api:8004/api/v1/webhook` - [ ] Variables de entorno configuradas (ver `.env.example`) ## Setup local (desarrollo) @@ -34,7 +34,7 @@ cp .env.example .env pip install -r requirements.txt # 4. Correr en modo desarrollo -uvicorn src.main:app --reload --port 8003 +uvicorn src.main:app --reload --port 8004 ``` ## Deployment en VPS (producción) @@ -50,7 +50,7 @@ docker-compose up -d --build docker-compose logs -f demo-seguros-api # Verificar que está corriendo -curl http://localhost:8003/health +curl http://localhost:8004/health ``` ## Endpoints diff --git a/docker-compose.yml b/docker-compose.yml index a5f3bdf..aabd1e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: build: . container_name: demo-seguros-api ports: - - "8003:8003" + - "8004:8004" env_file: - .env volumes: diff --git a/src/main.py b/src/main.py index 6dff241..a8439ca 100644 --- a/src/main.py +++ b/src/main.py @@ -49,7 +49,7 @@ async def health_check(): @app.on_event("startup") async def startup(): - logger.info("🚀 Demo Seguros Bot iniciado en puerto 8003") + logger.info("🚀 Demo Seguros Bot iniciado en puerto 8004") reminders_service.iniciar_scheduler()