added v0 ci/cd
Some checks failed
CI/CD Pipeline / Lint & Type Check (push) Failing after 1m0s
CI/CD Pipeline / Deploy to NODE Cloud (push) Has been skipped

This commit is contained in:
Ali Taghavi
2026-05-10 09:06:36 +03:30
parent 29b70c6865
commit 4c939ecdf1
6 changed files with 339 additions and 38 deletions

28
scripts/health-check.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Quick health check for biztaghavi on the server.
# Usage: bash scripts/health-check.sh
set -euo pipefail
APP_DIR="/srv/nodecloud/apps/biztaghavi"
PORT=3009
echo "=== HTTP Health Check ==="
HTTP_STATUS=$(curl -so /dev/null -w "%{http_code}" --connect-timeout 5 http://127.0.0.1:$PORT/ 2>&1 || echo "FAIL")
if [ "$HTTP_STATUS" = "200" ] || [ "$HTTP_STATUS" = "308" ] || [ "$HTTP_STATUS" = "301" ]; then
echo "✅ HTTP $HTTP_STATUS — app is responding on port $PORT"
else
echo "❌ HTTP $HTTP_STATUS — app may be down on port $PORT"
fi
echo ""
echo "=== Container Status ==="
cd "$APP_DIR"
docker compose ps
echo ""
echo "=== Last 20 Log Lines (next-app) ==="
docker compose logs --tail=20 next-app
echo ""
echo "=== Last 10 Log Lines (db) ==="
docker compose logs --tail=10 db