forked from CopilotKit/open-multi-agent-canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-app.ps1
More file actions
58 lines (55 loc) · 1.78 KB
/
start-app.ps1
File metadata and controls
58 lines (55 loc) · 1.78 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
# PowerShell shortcut to start the application
param (
[string]$Action = "start",
[string]$Component = "all",
[switch]$Interactive,
[switch]$Force,
[switch]$Detailed,
[switch]$Docker
)
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
# If Docker flag is specified, use Docker scripts
if ($Docker) {
switch ($Action) {
"start" {
if ($Component -eq "all") {
& "$scriptDir\scripts\docker\start-docker.ps1" -Watch
}
else {
& "$scriptDir\scripts\docker\start-docker.ps1" -ProfileName $Component -Watch
}
}
"stop" {
& "$scriptDir\scripts\docker\stop-docker.ps1"
}
"restart" {
& "$scriptDir\scripts\docker\stop-docker.ps1"
if ($Component -eq "all") {
& "$scriptDir\scripts\docker\start-docker.ps1" -Build -Watch
}
else {
& "$scriptDir\scripts\docker\start-docker.ps1" -ProfileName $Component -Build -Watch
}
}
"status" {
docker compose ps
}
"init" {
& "$scriptDir\scripts\docker\init-docker.ps1"
}
default {
Write-Host "Invalid action: $Action" -ForegroundColor Red
Write-Host "Valid actions: start, stop, restart, status, init" -ForegroundColor Yellow
}
}
}
else {
# Pass all parameters to the original script
$params = @()
if ($Action) { $params += "-Action"; $params += $Action }
if ($Component) { $params += "-Component"; $params += $Component }
if ($Interactive) { $params += "-Interactive" }
if ($Force) { $params += "-Force" }
if ($Detailed) { $params += "-Detailed" }
& "$scriptDir\scripts\manage-app.ps1" @params
}