chore: Update GitHub Actions workflows for improved performance and reliability

This commit is contained in:
defiQUG
2025-11-05 18:52:59 -08:00
parent 446e9495ce
commit c872168d23
6 changed files with 374 additions and 0 deletions

63
scripts/check-status.ps1 Normal file
View File

@@ -0,0 +1,63 @@
# Quick Status Check Script
Write-Host "`n=== Service Status ===" -ForegroundColor Cyan
# Check Webapp
$webappRunning = $false
try {
$result = Test-NetConnection -ComputerName localhost -Port 3000 -WarningAction SilentlyContinue
if ($result.TcpTestSucceeded) {
$webappRunning = $true
Write-Host "✅ Webapp (3000): Running" -ForegroundColor Green
}
} catch {
Write-Host "❌ Webapp (3000): Not running" -ForegroundColor Red
}
# Check Orchestrator
$orchRunning = $false
try {
$result = Test-NetConnection -ComputerName localhost -Port 8080 -WarningAction SilentlyContinue
if ($result.TcpTestSucceeded) {
$orchRunning = $true
Write-Host "✅ Orchestrator (8080): Running" -ForegroundColor Green
}
} catch {
Write-Host "❌ Orchestrator (8080): Not running" -ForegroundColor Red
}
# Check PostgreSQL
$pgRunning = $false
try {
$result = Test-NetConnection -ComputerName localhost -Port 5432 -WarningAction SilentlyContinue
if ($result.TcpTestSucceeded) {
$pgRunning = $true
Write-Host "✅ PostgreSQL (5432): Running" -ForegroundColor Green
}
} catch {
Write-Host "⚠️ PostgreSQL (5432): Not running (optional)" -ForegroundColor Yellow
}
# Check Redis
$redisRunning = $false
try {
$result = Test-NetConnection -ComputerName localhost -Port 6379 -WarningAction SilentlyContinue
if ($result.TcpTestSucceeded) {
$redisRunning = $true
Write-Host "✅ Redis (6379): Running" -ForegroundColor Green
}
} catch {
Write-Host "⚠️ Redis (6379): Not running (optional)" -ForegroundColor Yellow
}
Write-Host "`n=== Quick Access ===" -ForegroundColor Cyan
if ($webappRunning) {
Write-Host "Frontend: http://localhost:3000" -ForegroundColor White
}
if ($orchRunning) {
Write-Host "Backend: http://localhost:8080" -ForegroundColor White
Write-Host "Health: http://localhost:8080/health" -ForegroundColor White
}
Write-Host ""

65
scripts/start-all.ps1 Normal file
View File

@@ -0,0 +1,65 @@
# Start All Development Services
# Starts webapp, orchestrator, and optionally database services
Write-Host "Starting all development services..." -ForegroundColor Green
# Check if Docker is available
$dockerAvailable = $false
try {
docker --version | Out-Null
$dockerAvailable = $true
Write-Host "`nDocker detected - checking for database services..." -ForegroundColor Yellow
} catch {
Write-Host "`nDocker not available - starting services without containers" -ForegroundColor Yellow
}
# Start webapp
Write-Host "`n[1/3] Starting webapp (Next.js)..." -ForegroundColor Cyan
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd webapp; Write-Host 'Starting Next.js dev server...' -ForegroundColor Green; npm run dev" -WindowStyle Normal
Start-Sleep -Seconds 2
# Start orchestrator
Write-Host "[2/3] Starting orchestrator (Express)..." -ForegroundColor Cyan
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd orchestrator; Write-Host 'Starting Orchestrator service...' -ForegroundColor Green; npm run dev" -WindowStyle Normal
Start-Sleep -Seconds 2
# Start database services if Docker is available
if ($dockerAvailable) {
Write-Host "[3/3] Starting database services (PostgreSQL + Redis)..." -ForegroundColor Cyan
Write-Host " Using Docker Compose..." -ForegroundColor Gray
docker-compose up -d postgres redis
Start-Sleep -Seconds 3
# Check if services started successfully
$postgresStatus = docker-compose ps postgres 2>&1
$redisStatus = docker-compose ps redis 2>&1
if ($postgresStatus -match "Up") {
Write-Host " ✅ PostgreSQL running" -ForegroundColor Green
} else {
Write-Host " ⚠️ PostgreSQL may not be running" -ForegroundColor Yellow
}
if ($redisStatus -match "Up") {
Write-Host " ✅ Redis running" -ForegroundColor Green
} else {
Write-Host " ⚠️ Redis may not be running" -ForegroundColor Yellow
}
} else {
Write-Host "[3/3] Database services skipped (Docker not available)" -ForegroundColor Yellow
Write-Host " To use PostgreSQL/Redis, install Docker or start them manually" -ForegroundColor Gray
}
Write-Host "`n✅ All services starting!" -ForegroundColor Green
Write-Host "`n📍 Service URLs:" -ForegroundColor Cyan
Write-Host " Webapp: http://localhost:3000" -ForegroundColor White
Write-Host " Orchestrator: http://localhost:8080" -ForegroundColor White
Write-Host " Health Check: http://localhost:8080/health" -ForegroundColor White
if ($dockerAvailable) {
Write-Host " PostgreSQL: localhost:5432" -ForegroundColor White
Write-Host " Redis: localhost:6379" -ForegroundColor White
}
Write-Host "`n📝 Note: Services are running in separate windows." -ForegroundColor Yellow
Write-Host " To stop services, close the windows or use Ctrl+C in each." -ForegroundColor Gray

21
scripts/start-dev.ps1 Normal file
View File

@@ -0,0 +1,21 @@
# Start Development Servers
# This script starts both webapp and orchestrator services
Write-Host "Starting development servers..." -ForegroundColor Green
# Start webapp
Write-Host "`nStarting webapp (Next.js)..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd webapp; npm run dev" -WindowStyle Normal
# Wait a bit
Start-Sleep -Seconds 2
# Start orchestrator
Write-Host "Starting orchestrator (Express)..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "cd orchestrator; npm run dev" -WindowStyle Normal
Write-Host "`n✅ Development servers starting!" -ForegroundColor Green
Write-Host "`nWebapp: http://localhost:3000" -ForegroundColor Cyan
Write-Host "Orchestrator: http://localhost:8080" -ForegroundColor Cyan
Write-Host "`nNote: Servers are running in separate windows." -ForegroundColor Yellow