Добавить балансировщик HAProxy, две реплики API и хуки отказа

This commit is contained in:
Pavel Grigorev
2026-11-12 19:45:14 +03:00
parent 291dfe65bf
commit 5263d3ec7a
9 changed files with 328 additions and 5 deletions
+11
View File
@@ -0,0 +1,11 @@
@echo off
if "%TARGET_INSTANCE_ID%"=="" exit /b 2
cd /d "%~dp0.."
for /f %%i in ('docker compose ps -q api') do (
echo %%i| findstr /b /i "%TARGET_INSTANCE_ID%" >nul && (
docker stop -t 10 %%i >nul
exit /b 0
)
)
echo no running api replica matches TARGET_INSTANCE_ID 1>&2
exit /b 1