# 🚀 **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** ```bash # 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** ```bash 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 Proyecto** → **Deploy 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 Proyecto** → **Deploy from Git** 2. **Tipo:** Dockerfile 3. **Puerto:** `6080` 4. **Health Check:** `/health` ### **4. Variables de entorno en EasyPanel** En el dashboard de EasyPanel, configurar: ```env # 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)** ```yaml # livekit.yaml para EasyPanel port: 7880 redis: address: tu-redis:6379 password: tu-password ``` ### **Opción 2: LiveKit Cloud** - Registrarse en [LiveKit Cloud](https://cloud.livekit.io) - Copiar `LIVEKIT_URL`, `API_KEY`, `API_SECRET` - Configurar en variables de entorno --- ## 🔐 **SEGURIDAD** ### **Cambiar credenciales por defecto:** ```env 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:** ```bash # 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!** 🎉