docs(report): fill REPORT.md for lab4 grade 3

This commit is contained in:
2026-11-11 18:42:30 +03:00
parent ec540a1a72
commit 451482e1cb
72 changed files with 2894 additions and 22 deletions
+4
View File
@@ -0,0 +1,4 @@
@echo off
docker compose restart
timeout /t 10 /nobreak > NUL
exit 0
+2
View File
@@ -0,0 +1,2 @@
@echo off
"C:\Program Files\Git\bin\bash.exe" "%~dp0restart.sh"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
docker compose restart
for i in $(seq 1 30); do
if curl -s -f http://localhost:8080/health/ready > /dev/null; then
exit 0
fi
sleep 2
done
exit 1
+2
View File
@@ -0,0 +1,2 @@
@echo off
"C:\Program Files\Git\bin\bash.exe" "%~dp0stop-one.sh"
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# TARGET_INSTANCE_ID содержит X-Instance-Id реплики, которую нужно остановить
echo "Target instance: $TARGET_INSTANCE_ID"
CONTAINER_TO_STOP=""
# Ищем контейнер, в логах которого есть этот Instance ID (меняем lab3 на lab4!)
for container in $(docker ps -q --filter "name=mtusi2026lab4-api"); do
if docker logs $container 2>&1 | grep -q "$TARGET_INSTANCE_ID"; then
CONTAINER_TO_STOP=$container
break
fi
done
if [ -z "$CONTAINER_TO_STOP" ]; then
echo "Container not found for instance $TARGET_INSTANCE_ID" >&2
exit 1
fi
echo "Stopping container $CONTAINER_TO_STOP"
docker stop -t 1 $CONTAINER_TO_STOP