- Configure workspace Git repository with comprehensive .gitignore - Add Odoo as submodule for ERP reference code - Include documentation: SETUP.md, GIT-STRUCTURE.md - Add gitignore templates for projects (backend, frontend, database) - Structure supports independent repos per project/subproject level Workspace includes: - core/ - Reusable patterns, modules, orchestration system - projects/ - Active projects (erp-suite, gamilit, trading-platform, etc.) - knowledge-base/ - Reference code and patterns (includes Odoo submodule) - devtools/ - Development tools and templates - customers/ - Client implementations template 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
195 lines
6.1 KiB
Markdown
195 lines
6.1 KiB
Markdown
# INICIO RÁPIDO - CONFIGURACIÓN DE PUERTOS
|
|
|
|
**Configuración completada el:** 2025-12-05
|
|
|
|
---
|
|
|
|
## ARCHIVOS IMPORTANTES
|
|
|
|
### 1. Configuración de Puertos
|
|
📄 **`.env.ports`** - Definición centralizada de todos los puertos
|
|
|
|
### 2. Docker Compose
|
|
🐳 **`docker-compose.yml`** - Orquestación completa de servicios
|
|
|
|
### 3. Documentación
|
|
📚 **`docs/95-guias-desarrollo/PUERTOS-SERVICIOS.md`** - Guía completa
|
|
|
|
### 4. Scripts de Verificación
|
|
🔧 **`scripts/check-ports.sh`** - Verificar estado de puertos
|
|
|
|
### 5. Configuración del Proyecto
|
|
⚙️ **`orchestration/environment/PROJECT-ENV-CONFIG.yml`** - Config centralizada
|
|
|
|
---
|
|
|
|
## PUERTOS ASIGNADOS (QUICK REFERENCE)
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ FRONTEND SERVICES │
|
|
├─────────────────────────────────────────────────────────┤
|
|
│ Frontend Web (React) → 3100 │
|
|
│ Frontend Admin (futuro) → 3101 │
|
|
│ Frontend Preview (Vite) → 4173 │
|
|
└─────────────────────────────────────────────────────────┘
|
|
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ BACKEND SERVICES │
|
|
├─────────────────────────────────────────────────────────┤
|
|
│ Backend API (Express) → 4000 │
|
|
│ Backend WebSocket → 4001 │
|
|
│ Backend Webhooks → 4002 │
|
|
└─────────────────────────────────────────────────────────┘
|
|
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ PYTHON SERVICES │
|
|
├─────────────────────────────────────────────────────────┤
|
|
│ ML Engine (FastAPI) → 5000 │
|
|
│ Data Service → 5001 │
|
|
│ LLM Agent (futuro) → 5002 │
|
|
│ Portfolio Manager (futuro) → 5003 │
|
|
└─────────────────────────────────────────────────────────┘
|
|
|
|
┌─────────────────────────────────────────────────────────┐
|
|
│ INFRASTRUCTURE │
|
|
├─────────────────────────────────────────────────────────┤
|
|
│ PostgreSQL → 5432 ✓ ACTIVO │
|
|
│ Redis → 6379 ✓ ACTIVO │
|
|
└─────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
---
|
|
|
|
## COMANDOS ESENCIALES
|
|
|
|
### Verificar Estado de Puertos
|
|
```bash
|
|
bash scripts/check-ports.sh
|
|
```
|
|
|
|
### Iniciar Todo con Docker
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
### Ver Logs
|
|
```bash
|
|
docker-compose logs -f
|
|
```
|
|
|
|
### Verificar Puertos Ocupados
|
|
```bash
|
|
ss -tuln | grep LISTEN
|
|
```
|
|
|
|
### Verificar un Puerto Específico
|
|
```bash
|
|
lsof -i :4000
|
|
```
|
|
|
|
---
|
|
|
|
## ESTADO ACTUAL
|
|
|
|
### ✅ Servicios Activos
|
|
- PostgreSQL en puerto 5432
|
|
- Redis en puerto 6379
|
|
|
|
### ⚠️ Puertos Ocupados (No usar)
|
|
- 3000 - Ya en uso por otro servicio
|
|
- 8000 - Ya en uso por otro servicio
|
|
|
|
### 🔄 Servicios Por Configurar
|
|
1. **Backend API**: Actualizar de puerto 3000 → 4000
|
|
2. **Frontend Web**: Actualizar de puerto 5173 → 3100
|
|
3. **ML Engine**: Confirmar puerto 5000
|
|
4. **Data Service**: Configurar puerto 5001
|
|
|
|
---
|
|
|
|
## PRÓXIMOS PASOS
|
|
|
|
### 1. Actualizar Backend
|
|
```bash
|
|
cd apps/backend
|
|
# Editar .env
|
|
PORT=4000
|
|
```
|
|
|
|
### 2. Actualizar Frontend
|
|
```bash
|
|
cd apps/frontend
|
|
# Editar vite.config.ts
|
|
server.port = 3100
|
|
```
|
|
|
|
### 3. Probar Docker Compose
|
|
```bash
|
|
docker-compose up -d
|
|
docker-compose logs -f
|
|
```
|
|
|
|
### 4. Verificar Conectividad
|
|
```bash
|
|
curl http://localhost:4000/health
|
|
curl http://localhost:5000/health
|
|
```
|
|
|
|
---
|
|
|
|
## URLs DE ACCESO RÁPIDO
|
|
|
|
| Servicio | URL |
|
|
|----------|-----|
|
|
| Frontend | http://localhost:3100 |
|
|
| Backend API | http://localhost:4000/api/v1 |
|
|
| Backend Health | http://localhost:4000/health |
|
|
| ML Engine Docs | http://localhost:5000/docs |
|
|
| PgAdmin | http://localhost:5050 |
|
|
|
|
---
|
|
|
|
## TROUBLESHOOTING RÁPIDO
|
|
|
|
### Puerto ya en uso
|
|
```bash
|
|
# Ver qué está usando el puerto
|
|
lsof -i :4000
|
|
|
|
# Matar proceso
|
|
kill -9 $(lsof -t -i :4000)
|
|
```
|
|
|
|
### Docker no levanta
|
|
```bash
|
|
# Ver logs
|
|
docker-compose logs backend
|
|
|
|
# Reiniciar servicio
|
|
docker-compose restart backend
|
|
|
|
# Reconstruir
|
|
docker-compose up -d --build backend
|
|
```
|
|
|
|
### Variables de entorno no cargan
|
|
```bash
|
|
# Verificar que existe .env
|
|
ls -la apps/backend/.env
|
|
|
|
# Ver variables
|
|
cat apps/backend/.env | grep PORT
|
|
```
|
|
|
|
---
|
|
|
|
## DOCUMENTACIÓN COMPLETA
|
|
|
|
Para información detallada, ver:
|
|
- **`docs/95-guias-desarrollo/PUERTOS-SERVICIOS.md`**
|
|
|
|
---
|
|
|
|
**¿Preguntas?** Revisar la documentación completa o ejecutar `bash scripts/check-ports.sh`
|