lab3: балансировка, идемпотентность, compose-стенд, evidence и отчёт.

This commit is contained in:
Conloty
2026-11-13 13:57:48 +03:00
parent 0ab3a341aa
commit c86a65f41c
30 changed files with 2569 additions and 14 deletions
+9
View File
@@ -0,0 +1,9 @@
@echo off
rem Stops ONE API replica (TARGET_INSTANCE_ID = X-Instance-Id = short container id) and leaves it stopped.
if "%TARGET_INSTANCE_ID%"=="" exit /b 2
set TARGET_INSTANCE_ID | findstr /r /x "TARGET_INSTANCE_ID=[a-zA-Z0-9_.-][a-zA-Z0-9_.-]*" >nul || exit /b 2
set "CID="
for /f %%i in ('docker ps -q --filter "label=com.docker.compose.project=mtusi-lab3" --filter "label=com.docker.compose.service=api" --filter "id=%TARGET_INSTANCE_ID%"') do set "CID=%%i"
if "%CID%"=="" exit /b 1
docker stop -t 5 %CID% >nul
exit /b %errorlevel%