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

28
quick-fix-bcrypt.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Script tự động rebuild bcrypt và restart PM2
# Usage: ./quick-fix-bcrypt.sh
SERVER="root@senaai.tech"
PROJECT_PATH="/var/www/services/sena_db_api"
echo "🔧 Quick fix bcrypt on $SERVER..."
echo ""
ssh $SERVER << ENDSSH
cd $PROJECT_PATH && \
echo "🔨 Rebuilding bcrypt..." && \
npm rebuild bcrypt --build-from-source && \
npm rebuild && \
mkdir -p logs && \
echo "" && \
echo "✅ Bcrypt rebuilt successfully!" && \
echo "" && \
echo "🔄 Restarting PM2..." && \
pm2 restart all 2>/dev/null || pm2 start start.json && \
echo "" && \
echo "📊 PM2 Status:" && \
pm2 list && \
echo "" && \
echo "✅ All done!"
ENDSSH