$ErrorActionPreference = 'Stop' Set-Location -LiteralPath $PSScriptRoot docker info --format '{{.ServerVersion}}' if ($LASTEXITCODE -ne 0) { throw 'Start Docker Desktop first.' } docker run --rm --mount "type=bind,source=$PSScriptRoot,target=/work" --workdir /work python:3.13.15-slim-bookworm python scripts/init_local.py if ($LASTEXITCODE -ne 0) { throw 'Local configuration initialization failed.' } docker compose --env-file .env build api checks minio if ($LASTEXITCODE -ne 0) { throw 'Image build failed.' } docker compose --env-file .env up -d --no-build --wait --wait-timeout 180 if ($LASTEXITCODE -ne 0) { throw 'Stack startup failed; inspect docker compose logs.' } $taskConfig = docker compose --env-file .env config --format json | ConvertFrom-Json $taskPort = $taskConfig.services.lb.ports[0].published Write-Host "Ready: http://127.0.0.1:$taskPort/health/ready"