vdi-cloud/tools/start-cloud-live.ps1

14 lines
690 B
PowerShell

param([switch]$Build)
$ErrorActionPreference='Stop'
$vdiRoot=Split-Path -Parent $PSScriptRoot
Push-Location $vdiRoot
try {
if (!(Test-Path -LiteralPath '.local/live/.env')) { throw 'Configure PVE access and run tools/prepare-live-config.py first. See docs/cloud-live-integration.md.' }
$vdiArgs=@('compose','--env-file','.local/live/.env','-f','deploy/compose.live.yml','up','-d')
if ($Build) { $vdiArgs+='--build' }
& docker @vdiArgs
if ($LASTEXITCODE -ne 0) { throw 'Live platform startup failed' }
Write-Host 'Real platform: http://127.0.0.1:5182'
Write-Host 'Private initial administrator credentials: .local/live/admin-login.txt'
} finally { Pop-Location }