First
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
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
This commit is contained in:
commit
4169337dd0
68 changed files with 8726 additions and 0 deletions
69
app/health-check.ps1
Normal file
69
app/health-check.ps1
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# Health check script for FRP Manager (PowerShell)
|
||||
# This script checks if all services are running correctly
|
||||
|
||||
Write-Host "🔍 FRP Manager Health Check" -ForegroundColor Cyan
|
||||
Write-Host "==========================" -ForegroundColor Cyan
|
||||
|
||||
# Check if main application is running
|
||||
Write-Host "📡 Checking main application..." -ForegroundColor Yellow
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "http://localhost:3000/health" -UseBasicParsing -TimeoutSec 5
|
||||
if ($response.StatusCode -eq 200) {
|
||||
Write-Host "✅ Main application is running" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "❌ Main application returned status code: $($response.StatusCode)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host "❌ Main application is not accessible: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Check if API is responding
|
||||
Write-Host "🔌 Checking API endpoints..." -ForegroundColor Yellow
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "http://localhost:3000/api/tunnels" -UseBasicParsing -TimeoutSec 5
|
||||
if ($response.StatusCode -eq 200) {
|
||||
Write-Host "✅ API is responding" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "❌ API returned status code: $($response.StatusCode)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host "❌ API is not responding: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Check if FRPC container is running (if Docker is available)
|
||||
if (Get-Command docker -ErrorAction SilentlyContinue) {
|
||||
Write-Host "🐳 Checking FRPC container..." -ForegroundColor Yellow
|
||||
$dockerPs = docker ps 2>$null
|
||||
if ($dockerPs -and ($dockerPs | Select-String "frpc")) {
|
||||
Write-Host "✅ FRPC container is running" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "⚠️ FRPC container is not running (this is expected in development)" -ForegroundColor Yellow
|
||||
}
|
||||
} else {
|
||||
Write-Host "⚠️ Docker is not available, skipping FRPC container check" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Check if database is accessible
|
||||
Write-Host "🗄️ Checking database..." -ForegroundColor Yellow
|
||||
if (Test-Path "./data/tunnels.db") {
|
||||
Write-Host "✅ Database file exists" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "ℹ️ Database file doesn't exist yet (will be created on first use)" -ForegroundColor Blue
|
||||
}
|
||||
|
||||
# Check if configuration directory exists
|
||||
Write-Host "📁 Checking configuration directory..." -ForegroundColor Yellow
|
||||
if (Test-Path "./data") {
|
||||
Write-Host "✅ Configuration directory exists" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "❌ Configuration directory is missing" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "🎉 Health check completed successfully!" -ForegroundColor Green
|
||||
Write-Host "👉 Open http://localhost:3000 to access the FRP Manager" -ForegroundColor Cyan
|
||||
Loading…
Add table
Add a link
Reference in a new issue