-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-all-services.ps1
More file actions
73 lines (61 loc) · 3.14 KB
/
start-all-services.ps1
File metadata and controls
73 lines (61 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Artistry AI - Start All Services Script (PowerShell)
# Run this script to start all backend services and frontend
Write-Host "==================================================" -ForegroundColor Cyan
Write-Host " Artistry AI - Starting All Services" -ForegroundColor Cyan
Write-Host "==================================================" -ForegroundColor Cyan
Write-Host ""
# Function to start a service in a new window
function Start-Service {
param(
[string]$ServiceName,
[string]$Port,
[string]$Path
)
Write-Host "Starting $ServiceName on port $Port..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", `
"cd '$Path'; if (Test-Path 'venv\Scripts\Activate.ps1') { .\venv\Scripts\Activate.ps1 }; uvicorn app.main:app --port $Port --reload"
Start-Sleep -Seconds 2
}
$BackendPath = "$PSScriptRoot\artistry-backend"
# Start Backend Services
Write-Host ""
Write-Host "Starting Backend Services..." -ForegroundColor Green
Write-Host ""
Start-Service -ServiceName "Detect Service" -Port "8001" -Path "$BackendPath\detect"
Start-Service -ServiceName "Segment Service" -Port "8002" -Path "$BackendPath\segment"
Start-Service -ServiceName "Advise Service" -Port "8003" -Path "$BackendPath\advise"
Start-Service -ServiceName "Generate Service" -Port "8004" -Path "$BackendPath\generate"
Start-Service -ServiceName "Commerce Service" -Port "8005" -Path "$BackendPath\commerce"
Start-Service -ServiceName "Gateway Service" -Port "8000" -Path "$BackendPath\gateway"
Write-Host ""
Write-Host "Waiting for services to initialize..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
# Start Frontend
Write-Host ""
Write-Host "Starting Frontend..." -ForegroundColor Green
Start-Process powershell -ArgumentList "-NoExit", "-Command", `
"cd '$PSScriptRoot\frontend'; npm run dev"
Start-Sleep -Seconds 3
Write-Host ""
Write-Host "==================================================" -ForegroundColor Cyan
Write-Host " All Services Started!" -ForegroundColor Green
Write-Host "==================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Backend Services:" -ForegroundColor Yellow
Write-Host " Gateway: http://localhost:8000" -ForegroundColor White
Write-Host " Detect: http://localhost:8001" -ForegroundColor White
Write-Host " Segment: http://localhost:8002" -ForegroundColor White
Write-Host " Advise: http://localhost:8003" -ForegroundColor White
Write-Host " Generate: http://localhost:8004" -ForegroundColor White
Write-Host " Commerce: http://localhost:8005" -ForegroundColor White
Write-Host ""
Write-Host "Frontend:" -ForegroundColor Yellow
Write-Host " App: http://localhost:5173" -ForegroundColor White
Write-Host " Enhanced: http://localhost:5173/enhanced-workflow" -ForegroundColor White
Write-Host ""
Write-Host "API Documentation:" -ForegroundColor Yellow
Write-Host " Gateway: http://localhost:8000/docs" -ForegroundColor White
Write-Host " Commerce: http://localhost:8005/docs" -ForegroundColor White
Write-Host ""
Write-Host "Press any key to exit this window..." -ForegroundColor Cyan
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")