lab3 completed

This commit is contained in:
kuruoni
2026-11-24 23:07:02 +03:00
parent 0ab3a341aa
commit 06e12d8734
26 changed files with 1034 additions and 33 deletions
+8
View File
@@ -0,0 +1,8 @@
@echo off
docker compose restart
:wait
curl -fsS http://127.0.0.1:8080/health/ready | findstr /C:"\"status\":\"ok\"" >nul
if errorlevel 1 (
timeout /t 1 /nobreak >nul
goto wait
)
-10
View File
@@ -1,10 +0,0 @@
#!/bin/sh
set -eu
# TODO: copy to stop-one.sh, map TARGET_INSTANCE_ID to ONE API container/task.
# Stop that instance and leave it stopped; no stop of DB/LB/volumes.
# Return quickly (within 10 s); the test sends requests during this script.
# Restore the replica explicitly after the test. Never print credentials.
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
printf '%s
' 'TODO: implement stop-one.sh for your infrastructure' >&2
exit 2
+14
View File
@@ -0,0 +1,14 @@
@echo off
setlocal
set "REPLICA=%~1"
if "%REPLICA%"=="" set "REPLICA=api1"
if not "%REPLICA%"=="api1" if not "%REPLICA%"=="api2" (
echo Usage: stop-one.bat [api1^|api2]
exit /b 1
)
docker compose stop %REPLICA%
exit /b %ERRORLEVEL%