Перенести решение lab3 как базу lab4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 13:37:23 +03:00
co-authored by Claude Opus 5.5
parent ec540a1a72
commit e9ee60b0ba
31 changed files with 2856 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# Восстановление после stop-one.sh: запускает остановленные API-реплики и ждёт healthy.
set -eu
. "$(dirname "$0")/lib.sh"
all=$(service_ids api -a)
running=$(service_ids api)
started=""
for id in $all; do
case " $running " in *" $id "*) continue ;; esac
docker start "$id" >/dev/null
started="$started $id"
echo "started api container $(short "$id")"
done
[ -z "$started" ] || wait_healthy 60 $started
echo "running api replicas: $(service_ids api | wc -l | tr -d ' ')"