--- - name: Déployer Frontend Web hosts: edge become: true tasks: - name: Installer Node.js et nginx command: | incus exec veza-web -- bash -c 'apt update && apt install -y curl nginx' - name: Installer Node.js 18 command: | incus exec veza-web -- bash -c ' curl -fsSL https://deb.nodesource.com/setup_18.x | bash - apt install -y nodejs ' - name: Créer l'application web command: | incus exec veza-web -- bash -c 'cat > /var/www/html/index.html << EOF Veza V5 Ultra

🎵 Veza V5 Ultra

Plateforme Audio Collaborative
✅ Système en Ligne
Backend API Vérification...
Chat WebSocket Vérification...
Stream HLS Vérification...
EOF' - name: Configurer nginx command: | incus exec veza-web -- bash -c 'cat > /etc/nginx/sites-available/default << EOF server { listen 3000 default_server; root /var/www/html; index index.html; location / { try_files \$uri \$uri/ =404; } location /api/ { proxy_pass http://10.20.0.101:8080; proxy_set_header Host \$host; proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto \$scheme; } } EOF' - name: Redémarrer nginx command: | incus exec veza-web -- systemctl restart nginx