Lab2 grade 4: PostgreSQL, Redis sessions, Compose, student tests and evidence.

This commit is contained in:
2026-10-30 12:37:18 +03:00
parent 65003b6119
commit 950ff93573
34 changed files with 2252 additions and 41 deletions
+16
View File
@@ -0,0 +1,16 @@
@echo off
setlocal
cd /d "%~dp0\.."
docker compose --env-file .env restart postgres redis api
if errorlevel 1 exit /b 1
set /a i=0
:wait
docker compose --env-file .env exec -T api python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=2)" >nul 2>&1
if not errorlevel 1 exit /b 0
set /a i+=1
if %i% geq 60 (
echo restart: API not ready within 60s >&2
exit /b 1
)
timeout /t 1 /nobreak >nul
goto wait