schon/scripts/Windows/run.ps1
Egor fureunoir Gorbunov 1e8d053ab6 Features: 1) OS-specific scripts for deployments.
2) Healthcheck improvements.
Fixes: merge_recently_viewed for UserViewSet
2025-06-11 02:54:46 +03:00

31 lines
880 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 -ErrorAction SilentlyContinue))
{
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