mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 14:24:27 +00:00
- Integrate @formbricks/js for future surveys (FormbricksProvider) - Add WebhookForm component for unified form submission (contact/franchise/membership) - Update contact form with reason dropdown field - Update franchise form with new fields: estado, ciudad, socios checkbox - Update franchise benefits: manuals, training platform, RH system, investment $100k - Add Contacto link to desktop/mobile nav and footer - Update membership form to use WebhookForm with membership_id select - Update hero buttons to use #3E352E color consistently - Refactor contact/franchise pages to use new hero layout and components - Add webhook utility (lib/webhook.ts) for parallel submission to test+prod - Add email receipt hooks to booking endpoints - Update globals.css with new color variables and navigation styles - Docker configuration for deployment
63 lines
1.7 KiB
Bash
Executable File
63 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Pre-deployment checks para AnchorOS
|
|
|
|
echo "🔍 Verificando pre-requisitos de deployment..."
|
|
|
|
# Verificar Docker
|
|
if ! command -v docker &> /dev/null; then
|
|
echo "❌ Docker no está instalado"
|
|
exit 1
|
|
fi
|
|
|
|
# Verificar Docker Compose
|
|
if ! command -v docker-compose &> /dev/null; then
|
|
echo "❌ Docker Compose no está instalado"
|
|
exit 1
|
|
fi
|
|
|
|
# Verificar archivos necesarios
|
|
required_files=(".env" "package.json" "docker-compose.prod.yml" "Dockerfile")
|
|
for file in "${required_files[@]}"; do
|
|
if [ ! -f "$file" ]; then
|
|
echo "❌ Archivo faltante: $file"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Verificar variables de entorno críticas
|
|
required_vars=("NEXT_PUBLIC_SUPABASE_URL" "NEXT_PUBLIC_SUPABASE_ANON_KEY" "SUPABASE_SERVICE_ROLE_KEY" "RESEND_API_KEY")
|
|
for var in "${required_vars[@]}"; do
|
|
if ! grep -q "^$var=" .env; then
|
|
echo "❌ Variable faltante en .env: $var"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Verificar conectividad de red
|
|
echo "🌐 Verificando conectividad..."
|
|
if ! curl -s --max-time 5 https://supabase.co > /dev/null; then
|
|
echo "⚠️ Posible problema de conectividad a internet"
|
|
fi
|
|
|
|
# Verificar puertos libres
|
|
if lsof -Pi :3000 -sTCP:LISTEN -t >/dev/null; then
|
|
echo "⚠️ Puerto 3000 ya está en uso"
|
|
fi
|
|
|
|
if lsof -Pi :80 -sTCP:LISTEN -t >/dev/null; then
|
|
echo "⚠️ Puerto 80 ya está en uso"
|
|
fi
|
|
|
|
if lsof -Pi :443 -sTCP:LISTEN -t >/dev/null; then
|
|
echo "⚠️ Puerto 443 ya está en uso"
|
|
fi
|
|
|
|
# Verificar espacio en disco
|
|
available_space=$(df / | tail -1 | awk '{print $4}')
|
|
if [ "$available_space" -lt 1000000 ]; then # 1GB en KB
|
|
echo "⚠️ Espacio en disco bajo: $(df -h / | tail -1 | awk '{print $4}') disponible"
|
|
fi
|
|
|
|
echo "✅ Pre-requisitos verificados correctamente"
|
|
echo "🚀 Listo para deployment" |