Implement lab4 S3 attachments and resilience

This commit is contained in:
Ilia Sokolov
2026-10-31 18:30:23 +03:00
parent ec540a1a72
commit 1493ecd990
29 changed files with 2906 additions and 25 deletions
+11
View File
@@ -0,0 +1,11 @@
@echo off
rem Stops exactly ONE API replica: the container whose hostname equals TARGET_INSTANCE_ID (X-Instance-Id).
rem Leaves it stopped; DB, LB and volumes are untouched. Restore separately: docker compose up -d
setlocal
if "%TARGET_INSTANCE_ID%"=="" exit /b 2
cd /d "%~dp0.." || exit /b 1
set "CID="
for /f %%i in ('docker ps -q --filter "id=%TARGET_INSTANCE_ID%" --filter "label=com.docker.compose.service=api"') do if not defined CID set "CID=%%i"
if not defined CID exit /b 1
docker stop --time 5 %CID% >nul 2>&1
exit /b %errorlevel%