Релизованный минимум на 3, подготовка к написанию REPORT.md

This commit is contained in:
2026-11-17 17:05:08 +03:00
parent f880e234db
commit 38c463cd8b
8 changed files with 424 additions and 411 deletions
+3 -13
View File
@@ -1,15 +1,5 @@
@echo off
cd /d %~dp0\..
docker compose restart api postgres
set /a count=0
:check_loop
timeout /t 2 /nobreak >nul
curl -s -f http://localhost:8080/health/ready >nul 2>&1
if %errorlevel% equ 0 exit /b 0
set /a count+=1
if %count% lss 15 goto check_loop
echo API failed to become ready
exit /b 1
echo Restarting API and Database...
docker compose restart api-1 api-2 postgres
exit /b 0
+13
View File
@@ -0,0 +1,13 @@
@echo off
setlocal
cd /d %~dp0\..
if "%TARGET_INSTANCE_ID%"=="" (
echo TARGET_INSTANCE_ID is not set 1>&2
exit /b 2
)
if "%TARGET_INSTANCE_ID%"=="api-1" (set svc=api-1) else if "%TARGET_INSTANCE_ID%"=="api-2" (set svc=api-2) else (
echo unknown TARGET_INSTANCE_ID: %TARGET_INSTANCE_ID% 1>&2
exit /b 2
)
docker compose stop %svc%
exit /b %errorlevel%