update
All checks were successful
Deploy to Production / deploy (push) Successful in 21s

This commit is contained in:
silverpro89
2026-01-28 11:21:21 +07:00
parent 57c45d27a3
commit 3791b7cae1
23 changed files with 1033 additions and 317 deletions

49
fix-bcrypt-complete.sh Normal file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
# Fix bcrypt on server - Complete reinstall
# Run this script: bash fix-bcrypt-complete.sh
echo "════════════════════════════════════════════════════════"
echo " 🔧 Complete Bcrypt Fix Script"
echo " Server: root@senaai.tech"
echo "════════════════════════════════════════════════════════"
echo ""
ssh root@senaai.tech << 'ENDSSH'
set -e
echo "📁 Navigating to project..."
cd /var/www/services/sena_db_api
echo ""
echo "🗑️ Step 1: Removing old node_modules and lock files..."
rm -rf node_modules package-lock.json pnpm-lock.yaml yarn.lock
echo ""
echo "📦 Step 2: Installing dependencies with npm..."
npm install
echo ""
echo "🔨 Step 3: Rebuilding bcrypt from source..."
npm rebuild bcrypt --build-from-source
echo ""
echo "✅ Step 4: Build completed!"
echo ""
echo "🔄 Step 5: Restarting PM2 processes..."
pm2 restart sena-api
pm2 restart worker-db-write
pm2 restart worker-lesson-fill
pm2 restart worker-process-data
echo ""
echo "📊 PM2 Status:"
pm2 list
echo ""
echo "════════════════════════════════════════════════════════"
echo " ✅ All done! Check logs with: pm2 logs sena-api"
echo "════════════════════════════════════════════════════════"
ENDSSH