schon/scripts/Windows/run.ps1

31 lines
850 B
PowerShell

#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
Write-Host "Verifying all images are present…" -ForegroundColor Green
$config = docker compose config --format json | ConvertFrom-Json
foreach ($prop in $config.services.PSObject.Properties)
{
$svc = $prop.Value
if (-not ($svc.PSObject.Properties.Name -contains 'image'))
{
continue
}
$image = $svc.PSObject.Properties['image'].Value
if (-not (docker image inspect $image))
{
Write-Error "Required images not found. Please run install.ps1 first."
exit 1
}
Write-Host " • Found image: $image"
}
Write-Host "All images present, starting services…" -ForegroundColor Green
docker compose up --no-build --detach --wait | Out-Null
Write-Host "Containers are up and healthy." -ForegroundColor Green