This commit is contained in:
EgorAnti
2026-11-18 20:33:27 +03:00
parent 276dbdad8a
commit 77a43fa9cf
114 changed files with 6271 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
@echo off
setlocal EnableExtensions
cd /d "%~dp0\.."
set /a REPLICA_COUNT=0
for /f "usebackq delims=" %%C in (`docker compose --env-file .env ps -q api`) do set /a REPLICA_COUNT+=1
if %REPLICA_COUNT% LSS 2 exit /b 2
for /f "usebackq delims=" %%C in (`docker compose --env-file .env ps -q api`) do call :replace_one %%C
exit /b 0
:replace_one
docker stop --time 10 %1 >nul || exit /b 1
docker rm %1 >nul || exit /b 1
docker compose --env-file .env up -d --wait --wait-timeout 90 --no-deps --scale api=2 api >nul || exit /b 1
exit /b 0