forked from mtusi2026/mtusi2026lab3
ЛР 3: балансировка, идемпотентность и проверки на 4
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
$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 up -d --build --wait --wait-timeout 120
|
||||
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"
|
||||
Reference in New Issue
Block a user