Refactor redeploy script and improve documentation

- Updated `redeploy-ubuntu.sh` to enhance error handling and user feedback during the redeployment process.
- Revised `REDEPLOY_GUIDE.md` for clarity and added troubleshooting tips based on user feedback.
- Improved structure and navigation of deployment documentation for better accessibility.
- Minor adjustments to `redeploy-hint.md` to reflect recent changes in automation examples.
This commit is contained in:
Primakov Alexandr Alexandrovich 2025-10-13 00:22:44 +03:00
parent 493a14e2c8
commit cef0249dc1

34
check-service-status.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
echo "=========================================="
echo "AI Review Service - Status Check"
echo "=========================================="
echo ""
echo "1. Service Status:"
systemctl status ai-review.service --no-pager
echo ""
echo "=========================================="
echo "2. Last 100 lines of logs:"
echo "=========================================="
journalctl -u ai-review.service -n 100 --no-pager
echo ""
echo "=========================================="
echo "3. Checking files:"
echo "=========================================="
echo "Backend exists: $([ -d /home/user/code-review-agent/backend ] && echo 'YES' || echo 'NO')"
echo "Frontend exists: $([ -d /home/user/code-review-agent/frontend ] && echo 'YES' || echo 'NO')"
echo "Public dir exists: $([ -d /home/user/code-review-agent/backend/public ] && echo 'YES' || echo 'NO')"
echo "venv exists: $([ -d /home/user/code-review-agent/backend/venv ] && echo 'YES' || echo 'NO')"
echo ".env exists: $([ -f /home/user/code-review-agent/backend/.env ] && echo 'YES' || echo 'NO')"
echo "DB exists: $([ -f /home/user/code-review-agent/backend/review.db ] && echo 'YES' || echo 'NO')"
echo ""
echo "=========================================="
echo "4. Manual start test:"
echo "=========================================="
echo "Run this command to see actual error:"
echo "cd /home/user/code-review-agent/backend && source venv/bin/activate && python -m uvicorn app.main:app --host 0.0.0.0 --port 8000"