lab4 - оценка 4
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
cd /d "%~dp0.."
|
||||
|
||||
set TMP=%TEMP%\lab4-restart
|
||||
if not exist "%TMP%" mkdir "%TMP%"
|
||||
|
||||
echo Restarting stack without removing volumes...
|
||||
docker compose --compatibility restart
|
||||
|
||||
set COUNT=0
|
||||
|
||||
:wait
|
||||
set /a COUNT+=1
|
||||
if %COUNT% GTR 90 (
|
||||
echo FAIL: stack did not become ready in time
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
curl.exe -s -o nul -w "%%{http_code}" http://localhost:8080/health/ready > "%TMP%\code.txt"
|
||||
set /p C=<"%TMP%\code.txt"
|
||||
|
||||
if "%C%"=="200" (
|
||||
echo Stack is ready.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
timeout /t 1 /nobreak >nul
|
||||
goto wait
|
||||
Reference in New Issue
Block a user