Cambiar puerto a 8004 (8003 ocupado en el VPS)

This commit is contained in:
Fernando Davila Oyarzabal committed 2026-07-27 14:54:54 -06:00
1 parent c81dab926c
commit 7dc6e3d522
5 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ leyendo un Google Sheet en tiempo real. NO genera PDFs — solo responde texto.
## Flujo del Sistema ## Flujo del Sistema
``` ```
WhatsApp → EvolutionAPI (instancia: demo-seguros) WhatsApp → EvolutionAPI (instancia: demo-seguros)
→ FastAPI :8003 (este proyecto) → FastAPI :8004 (este proyecto)
→ GPT-4o-mini (clasificar intención del mensaje) → GPT-4o-mini (clasificar intención del mensaje)
→ Google Sheets (leer datos reales) → Google Sheets (leer datos reales)
→ Texto estructurado → WhatsApp → Texto estructurado → WhatsApp
@@ -17,7 +17,7 @@ WhatsApp → EvolutionAPI (instancia: demo-seguros)
- **VPS:** 191.101.233.43 (Hostinger Ubuntu 24.04) - **VPS:** 191.101.233.43 (Hostinger Ubuntu 24.04)
- **Panel:** Coolify v4 — http://191.101.233.43:8000 - **Panel:** Coolify v4 — http://191.101.233.43:8000
- **EvolutionAPI:** http://evo-r8gs8s848s44ww00cwgkoooo.191.101.233.43.sslip.io:8081 - **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) - **Redis:** contenedor `demo-seguros-redis` (aislado del bot de cotizaciones)
## Estructura del Proyecto ## Estructura del Proyecto
+2 -2
View File
@@ -10,6 +10,6 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY src/ ./src/ 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"]
+4 -4
View File
@@ -8,7 +8,7 @@ Bot de WhatsApp para consulta de vencimientos de pólizas vehiculares.
## Arquitectura ## Arquitectura
``` ```
WhatsApp → EvolutionAPI (demo-seguros) → FastAPI :8003 WhatsApp → EvolutionAPI (demo-seguros) → FastAPI :8004
→ GPT-4o-mini → Google Sheets → Respuesta texto → WhatsApp → 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 - [ ] Instancia `demo-seguros` creada en EvolutionAPI con número conectado
- [ ] Sheet de seguros compartido con `wk-bot-sheets@wk-bot-489515.iam.gserviceaccount.com` - [ ] 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`) - [ ] Variables de entorno configuradas (ver `.env.example`)
## Setup local (desarrollo) ## Setup local (desarrollo)
@@ -34,7 +34,7 @@ cp .env.example .env
pip install -r requirements.txt pip install -r requirements.txt
# 4. Correr en modo desarrollo # 4. Correr en modo desarrollo
uvicorn src.main:app --reload --port 8003 uvicorn src.main:app --reload --port 8004
``` ```
## Deployment en VPS (producción) ## Deployment en VPS (producción)
@@ -50,7 +50,7 @@ docker-compose up -d --build
docker-compose logs -f demo-seguros-api docker-compose logs -f demo-seguros-api
# Verificar que está corriendo # Verificar que está corriendo
curl http://localhost:8003/health curl http://localhost:8004/health
``` ```
## Endpoints ## Endpoints
+1 -1
View File
@@ -3,7 +3,7 @@ services:
build: . build: .
container_name: demo-seguros-api container_name: demo-seguros-api
ports: ports:
- "8003:8003" - "8004:8004"
env_file: env_file:
- .env - .env
volumes: volumes:
+1 -1
View File
@@ -49,7 +49,7 @@ async def health_check():
@app.on_event("startup") @app.on_event("startup")
async def 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() reminders_service.iniciar_scheduler()