forked from mtusi2026/mtusi2026lab2
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
This commit is contained in:
+35
-3
@@ -1,4 +1,36 @@
|
||||
@echo off
|
||||
docker compose restart api
|
||||
docker compose restart postgres
|
||||
docker compose restart redis
|
||||
REM Останавливаем всё в обратном порядке зависимостей
|
||||
docker compose stop api
|
||||
docker compose stop postgres
|
||||
docker compose stop redis
|
||||
|
||||
REM Поднимаем в правильном порядке
|
||||
docker compose up -d postgres
|
||||
docker compose up -d redis
|
||||
|
||||
REM Ждём, пока они станут healthy
|
||||
:wait_pg
|
||||
docker compose ps postgres | findstr /C:"(healthy)" >nul
|
||||
if errorlevel 1 (
|
||||
timeout /t 2 /nobreak >nul
|
||||
goto wait_pg
|
||||
)
|
||||
|
||||
:wait_redis
|
||||
docker compose ps redis | findstr /C:"(healthy)" >nul
|
||||
if errorlevel 1 (
|
||||
timeout /t 2 /nobreak >nul
|
||||
goto wait_redis
|
||||
)
|
||||
|
||||
REM Поднимаем api (он сам применит миграции и стартует)
|
||||
docker compose up -d api
|
||||
|
||||
:wait_api
|
||||
docker compose ps api | findstr /C:"(healthy)" >nul
|
||||
if errorlevel 1 (
|
||||
timeout /t 2 /nobreak >nul
|
||||
goto wait_api
|
||||
)
|
||||
|
||||
echo Restart complete
|
||||
Reference in New Issue
Block a user