ЛР 3: балансировка, идемпотентность и проверки на 4

This commit is contained in:
2026-11-01 17:02:42 +03:00
parent 0ab3a341aa
commit 412b1bb09d
64 changed files with 3904 additions and 53 deletions
+11
View File
@@ -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"