openvidu/EASYPANEL-SIMPLE.md
Cesar Mendivil 64924f9999
Some checks failed
WebComponent E2E Tests / WebComponent E2E Tests (push) Has been cancelled
WebComponent Unit Tests / WebComponent Unit Tests (push) Has been cancelled
Backend Unit Tests / Backend Unit Tests (push) Has been cancelled
Applied new local config
2025-11-01 00:49:33 -07:00

3.9 KiB

🚀 DEPLOYMENT EN EASYPANEL - SIMPLIFICADO

📋 RESUMEN DE CONFIGURACIÓN

EasyPanel maneja automáticamente:

  • SSL/TLS con certificados gratuitos
  • Subdominios (ej: tu-app.easypanel.host)
  • Proxy reverso con Traefik
  • HTTPS redirect

Tu aplicación expone:

  • Solo puerto 80 (HTTP)
  • Nginx como proxy interno
  • OpenVidu Meet backend

🔧 PASOS DE DEPLOYMENT

1. Preparar archivos

# Los archivos ya están listos:
# ✅ Dockerfile (optimizado)
# ✅ docker-compose.yml (puerto 80 solamente)
# ✅ nginx.conf (sin SSL - solo HTTP)
# ✅ .env.production (variables de entorno)

2. Subir a repositorio Git

git add Dockerfile docker-compose.yml nginx.conf .env.production
git commit -m "Add EasyPanel deployment config"
git push

3. Crear proyecto en EasyPanel

Opción A: Docker Compose (Recomendado)

  1. Nuevo ProyectoDeploy from Git
  2. Conectar repositorio
  3. Tipo: Docker Compose
  4. Archivo: docker-compose.yml
  5. Puerto expuesto: 80

Opción B: Dockerfile simple

  1. Nuevo ProyectoDeploy from Git
  2. Tipo: Dockerfile
  3. Puerto: 6080
  4. Health Check: /health

4. Variables de entorno en EasyPanel

En el dashboard de EasyPanel, configurar:

# ADMIN (¡CAMBIAR!)
ADMIN_PASSWORD=mi-password-super-seguro

# LIVEKIT (configurar según tu setup)
LIVEKIT_URL=wss://tu-livekit-domain.com
LIVEKIT_API_KEY=tu-api-key
LIVEKIT_API_SECRET=tu-secret-de-32-caracteres

# REDIS (opcional)
REDIS_HOST=tu-redis-host
REDIS_PASSWORD=tu-redis-password

5. Deploy

  • Hacer clic en Deploy
  • EasyPanel construirá automáticamente
  • Generará subdominio (ej: openvidu-meet.easypanel.host)
  • Aplicará SSL automáticamente

🌐 RESULTADO FINAL

https://tu-app.easypanel.host
├── EasyPanel Traefik Proxy (SSL/HTTPS)
└── Tu Container (puerto 80)
    ├── Nginx (proxy interno)
    └── OpenVidu Meet Backend (:6080)

URLs disponibles:

  • Aplicación: https://tu-app.easypanel.host
  • Admin Login: https://tu-app.easypanel.host/admin
  • API: https://tu-app.easypanel.host/api/
  • Health Check: https://tu-app.easypanel.host/health

🔧 CONFIGURACIÓN LIVEKIT

Para que funcione completamente, necesitas LiveKit server separado:

Opción 1: LiveKit en EasyPanel (otro proyecto)

# livekit.yaml para EasyPanel
port: 7880
redis:
  address: tu-redis:6379
  password: tu-password

Opción 2: LiveKit Cloud

  • Registrarse en LiveKit Cloud
  • Copiar LIVEKIT_URL, API_KEY, API_SECRET
  • Configurar en variables de entorno

🔐 SEGURIDAD

Cambiar credenciales por defecto:

ADMIN_PASSWORD=un-password-muy-seguro
LIVEKIT_API_SECRET=secret-de-al-menos-32-caracteres

Headers de seguridad incluidos:

  • Rate limiting (API: 10req/s, Login: 1req/s)
  • X-Frame-Options
  • X-Content-Type-Options
  • X-XSS-Protection

🚨 TROUBLESHOOTING

El container no inicia:

# Ver logs en EasyPanel dashboard
# O conectar por SSH:
docker logs container-name

502 Bad Gateway:

  • Verificar que el backend responde en puerto 6080
  • Health check: curl localhost:6080/health

WebSocket no funciona:

  • Verificar configuración de LiveKit
  • Headers de WebSocket están configurados en nginx

Admin login no funciona:

  • Verificar variable ADMIN_PASSWORD
  • Limpiar datos Redis si está configurado

CHECKLIST FINAL

  • Repository con archivos de deployment subido
  • Proyecto creado en EasyPanel
  • Variables de entorno configuradas
  • Password admin cambiado
  • LiveKit configurado (separado)
  • SSL funcionando automáticamente
  • Admin login funcional en /admin

¡Ya tienes OpenVidu Meet funcionando en producción con EasyPanel! 🎉