Files
roa2web-service-auto/deployment/windows/scripts/Start-ROA2WEB.ps1
Marius Mutu 6b13ffa183 Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture

Tech Stack:
- Backend: FastAPI + python-oracledb (Oracle DB integration)
- Frontend: Vue.js 3 + PrimeVue + Vite
- Telegram Bot: python-telegram-bot + SQLite
- Infrastructure: Shared database pool, JWT authentication, SSH tunnel

Features:
- FastAPI backend with async Oracle connection pool
- Vue.js 3 responsive frontend with PrimeVue components
- Telegram bot alternative interface
- Microservices architecture with shared components
- Complete deployment support (Linux Docker + Windows IIS)
- Comprehensive testing (Playwright E2E + pytest)

Repository Structure:
- reports-app/ - Main application (backend, frontend, telegram-bot)
- shared/ - Shared components (database pool, auth, utils)
- deployment/ - Deployment scripts (Linux & Windows)
- docs/ - Project documentation
- security/ - Security scanning and git hooks
2025-10-25 14:55:08 +03:00

67 lines
2.0 KiB
PowerShell

<#
.SYNOPSIS
Start ROA2WEB Backend Service
.DESCRIPTION
Starts the ROA2WEB backend Windows service and validates it's running properly.
.EXAMPLE
.\Start-ROA2WEB.ps1
#>
[CmdletBinding()]
param(
[string]$ServiceName = "ROA2WEB-Backend",
[int]$Timeout = 30
)
$ErrorActionPreference = "Stop"
Write-Host "`n[*] Starting ROA2WEB Backend Service..." -ForegroundColor Cyan
try {
$service = Get-Service -Name $ServiceName -ErrorAction Stop
if ($service.Status -eq "Running") {
Write-Host " [OK] Service is already running" -ForegroundColor Green
exit 0
}
# Start service
Start-Service -Name $ServiceName
Write-Host " [*] Service start command issued" -ForegroundColor Yellow
# Wait for service to start
$elapsed = 0
while ($service.Status -ne "Running" -and $elapsed -lt $Timeout) {
Start-Sleep -Seconds 1
$service.Refresh()
$elapsed++
Write-Host " [*] Waiting for service to start... ($elapsed/$Timeout)" -ForegroundColor Yellow
}
if ($service.Status -eq "Running") {
Write-Host " [OK] Service started successfully" -ForegroundColor Green
# Wait a bit and test health endpoint
Start-Sleep -Seconds 3
try {
$response = Invoke-WebRequest -Uri "http://localhost:8000/health" -UseBasicParsing -TimeoutSec 5
if ($response.StatusCode -eq 200) {
Write-Host " [OK] Health check passed" -ForegroundColor Green
}
} catch {
Write-Host " [WARN] Health check failed (service may still be starting)" -ForegroundColor Yellow
}
exit 0
} else {
Write-Host " [ERROR] Service failed to start (Status: $($service.Status))" -ForegroundColor Red
Write-Host " Check logs: C:\inetpub\wwwroot\roa2web\logs\backend-stderr.log" -ForegroundColor Yellow
exit 1
}
} catch {
Write-Host " [ERROR] Failed to start service: $_" -ForegroundColor Red
exit 1
}