Some checks failed
Build All Docker Images / changes (push) Has been cancelled
Build and Push App Docker Image / build (push) Has been cancelled
Build and Push Node Docker Image / build (push) Has been cancelled
Test and Lint / test-app (push) Has been cancelled
Test and Lint / test-node (push) Has been cancelled
Test and Lint / lint-dockerfiles (push) Has been cancelled
Test and Lint / security-scan (push) Has been cancelled
Build All Docker Images / build-app (push) Has been cancelled
Build All Docker Images / build-node (push) Has been cancelled
Build All Docker Images / summary (push) Has been cancelled
58 lines
1.6 KiB
Bash
58 lines
1.6 KiB
Bash
#!/bin/bash
|
||
|
||
# Health check script for FRP Manager
|
||
# This script checks if all services are running correctly
|
||
|
||
echo "🔍 FRP Manager Health Check"
|
||
echo "=========================="
|
||
|
||
# Check if main application is running
|
||
echo "📡 Checking main application..."
|
||
if curl -s http://localhost:3000/health > /dev/null; then
|
||
echo "✅ Main application is running"
|
||
else
|
||
echo "❌ Main application is not accessible"
|
||
exit 1
|
||
fi
|
||
|
||
# Check if API is responding
|
||
echo "🔌 Checking API endpoints..."
|
||
if curl -s http://localhost:3000/api/tunnels > /dev/null; then
|
||
echo "✅ API is responding"
|
||
else
|
||
echo "❌ API is not responding"
|
||
exit 1
|
||
fi
|
||
|
||
# Check if FRPC container is running (if Docker is available)
|
||
if command -v docker &> /dev/null; then
|
||
echo "🐳 Checking FRPC container..."
|
||
if docker ps | grep -q frpc; then
|
||
echo "✅ FRPC container is running"
|
||
else
|
||
echo "⚠️ FRPC container is not running (this is expected in development)"
|
||
fi
|
||
else
|
||
echo "⚠️ Docker is not available, skipping FRPC container check"
|
||
fi
|
||
|
||
# Check if database is accessible
|
||
echo "🗄️ Checking database..."
|
||
if [ -f "./data/tunnels.db" ]; then
|
||
echo "✅ Database file exists"
|
||
else
|
||
echo "ℹ️ Database file doesn't exist yet (will be created on first use)"
|
||
fi
|
||
|
||
# Check if configuration directory exists
|
||
echo "📁 Checking configuration directory..."
|
||
if [ -d "./data" ]; then
|
||
echo "✅ Configuration directory exists"
|
||
else
|
||
echo "❌ Configuration directory is missing"
|
||
exit 1
|
||
fi
|
||
|
||
echo ""
|
||
echo "🎉 Health check completed successfully!"
|
||
echo "👉 Open http://localhost:3000 to access the FRP Manager"
|