deploy
This commit is contained in:
parent
941b59ba8e
commit
c165a6edae
1 changed files with 14 additions and 7 deletions
|
|
@ -160,7 +160,7 @@ jobs:
|
|||
sudo systemctl daemon-reload
|
||||
sudo systemctl start mnemo_cards_server
|
||||
sleep 2
|
||||
systemctl status mnemo_cards_server --no-pager
|
||||
sudo systemctl status mnemo_cards_server --no-pager --lines=5 || echo "Could not get status"
|
||||
ENDSSH
|
||||
|
||||
- name: Generate and Deploy Nginx Configs
|
||||
|
|
@ -523,7 +523,7 @@ jobs:
|
|||
pgrep -f mnemo_cards_server || echo "No backend process found"
|
||||
ps aux | grep mnemo_cards_server | grep -v grep || echo "No backend in ps"
|
||||
echo "🔍 Checking backend service status:"
|
||||
timeout 10 sudo systemctl status mnemo_cards_server --no-pager || echo "Could not get backend status"
|
||||
timeout 10 sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get backend status"
|
||||
echo "🔍 Checking if port 8081 is bound:"
|
||||
ss -tlnp | grep :8081 || echo "Port 8081 not bound"
|
||||
fi
|
||||
|
|
@ -579,18 +579,25 @@ jobs:
|
|||
echo "✅ backend: running"
|
||||
else
|
||||
echo "❌ backend: not running or status check timed out"
|
||||
timeout 15 sudo systemctl status mnemo_cards_server --no-pager || echo "Could not get backend status"
|
||||
timeout 15 sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get backend status"
|
||||
|
||||
# Check backend logs for errors
|
||||
echo "📋 Checking backend logs for recent errors:"
|
||||
timeout 10 sudo journalctl -u mnemo_cards_server --since "10 minutes ago" --no-pager | grep -i "error\|fail\|crash\|oom\|kill" | tail -5 || echo "No recent backend errors"
|
||||
|
||||
# Try to start it if it's stopped
|
||||
echo "🚀 Attempting to start backend..."
|
||||
if timeout 30 sudo systemctl start mnemo_cards_server; then
|
||||
sleep 3
|
||||
if timeout 30 sudo systemctl start mnemo_cards_server 2>&1; then
|
||||
sleep 5 # Give more time to start
|
||||
if timeout 30 sudo systemctl is-active --quiet mnemo_cards_server; then
|
||||
echo "✅ backend: started successfully"
|
||||
else
|
||||
echo "❌ backend: failed to start"
|
||||
timeout 15 sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get status after start attempt"
|
||||
fi
|
||||
else
|
||||
echo "❌ backend start command timed out"
|
||||
echo "❌ backend start command timed out or failed"
|
||||
sudo systemctl start mnemo_cards_server || echo "Start command failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -713,7 +720,7 @@ jobs:
|
|||
echo "✅ backend: работает"
|
||||
else
|
||||
echo "❌ backend: НЕ работает!"
|
||||
sudo systemctl status mnemo_cards_server --no-pager || true
|
||||
sudo systemctl status mnemo_cards_server --no-pager --lines=3 2>/dev/null || echo "Could not get backend status"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue