openvidu/restart-stack.sh
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

63 lines
2.1 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -e
echo "🔄 REINICIANDO STACK COMPLETO OPENVIDU MEET"
echo "=========================================="
# Crear directorio de logs
mkdir -p /tmp/ovm-logs
echo -e "\n1⃣ Matando procesos existentes..."
pkill -f "node.*dist/src/server.js" || true
pkill -f "livekit-server" || true
pkill -f "ng serve" || true
pkill -f "pnpm.*start" || true
sleep 3
echo -e "\n2⃣ Reiniciando Backend..."
cd /home/xesar/Documentos/openvidu-meet/meet-ce/backend
pnpm run build
nohup env \
NODE_ENV=development \
LIVEKIT_URL=wss://livekit-server.bfzqqk.easypanel.host \
LIVEKIT_URL_PRIVATE=wss://livekit-server.bfzqqk.easypanel.host \
LIVEKIT_API_KEY=devkey \
LIVEKIT_API_SECRET=secretsecretsecretsecretsecretsecret \
MEET_REDIS_HOST=192.168.1.19 \
MEET_REDIS_PORT=6379 \
MEET_REDIS_PASSWORD=redispassword \
MEET_BLOB_STORAGE_MODE=s3 \
MEET_S3_SERVICE_ENDPOINT=http://192.168.1.19:9000 \
MEET_S3_ACCESS_KEY=minioadmin \
MEET_S3_SECRET_KEY=minioadmin \
MEET_S3_BUCKET=openvidu-appdata \
MEET_S3_WITH_PATH_STYLE_ACCESS=true \
MEET_INITIAL_ADMIN_USER=admin \
MEET_INITIAL_ADMIN_PASSWORD=admin \
node dist/src/server.js > /tmp/ovm-logs/backend.log 2>&1 &
echo "✅ Backend iniciado"
echo -e "\n3⃣ Reiniciando LiveKit..."
cd /home/xesar/Documentos/openvidu-meet
nohup livekit-server --config livekit.yaml > /tmp/ovm-logs/livekit.log 2>&1 &
echo "✅ LiveKit iniciado"
echo -e "\n⏳ Esperando arranque de servicios (15s)..."
sleep 15
echo -e "\n🔍 Verificación final:"
echo "Puertos activos:"
ss -ltn | egrep '6080|7880|6379|9000' | sort
echo -e "\nTest conectividad:"
curl -s -o /dev/null -w "✅ Backend (6080): %{http_code}\n" https://openvidu.bfzqqk.easypanel.host || echo "❌ Backend no responde"
redis-cli -h 192.168.1.19 -p 6379 -a redispassword ping 2>/dev/null && echo "✅ Redis: PONG" || echo "❌ Redis no responde"
echo -e "\n🚀 STACK REINICIADO COMPLETAMENTE"
echo "📄 Logs en: /tmp/ovm-logs/"
echo -e "\n🌐 URLs:"
echo " • Frontend: http://192.168.1.19:4200"
echo " • Backend: https://openvidu.bfzqqk.easypanel.host"
echo " • LiveKit: wss://livekit-server.bfzqqk.easypanel.host"