forked from mtusi2026/mtusi2026lab3
ЛР 3: HAProxy + 2 реплики, общая идемпотентность, rolling update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ab3a341aa
commit
a71c582195
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
rem Failover hook (Windows): stop ONE api container whose short ID = TARGET_INSTANCE_ID.
|
||||
if "%TARGET_INSTANCE_ID%"=="" exit /b 2
|
||||
set CID=
|
||||
for /f %%i in ('docker ps -q --filter "id=%TARGET_INSTANCE_ID%" --filter "label=com.docker.compose.service=api"') do set CID=%%i
|
||||
if "%CID%"=="" exit /b 1
|
||||
docker stop -t 8 %CID% >nul
|
||||
Reference in New Issue
Block a user