Реализовать лабораторную 4 на оценку 5

Добавить приватное S3-хранилище, вложения, presigned upload, reconciler и доказательства.
This commit is contained in:
Чиняева
2026-11-07 01:37:21 +03:00
parent ec540a1a72
commit f39ae06ef3
69 changed files with 5254 additions and 31 deletions
+21
View File
@@ -0,0 +1,21 @@
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
Set-Location $root
$target = $env:TARGET_INSTANCE_ID
if ([string]::IsNullOrWhiteSpace($target)) { exit 2 }
$ids = @(docker compose --env-file .env ps -q api)
foreach ($id in $ids) {
if ([string]::IsNullOrWhiteSpace($id)) { continue }
$hostName = (docker inspect --format '{{.Config.Hostname}}' $id).Trim()
$containerName = (docker inspect --format '{{.Name}}' $id).Trim().TrimStart('/')
if ($hostName -eq $target -or $hostName.StartsWith($target) -or
$target.StartsWith($hostName) -or $containerName -eq $target) {
docker stop --time 5 $id | Out-Null
exit 0
}
}
Write-Error 'stop-one: no API replica matches TARGET_INSTANCE_ID'
exit 3