Files
mtusi2026lab3/scripts/restart.sh
T
Weinmaier_AndrewandClaude Opus 5.5 2e7a80be92 lab3: балансировка, идемпотентность, отказ реплики, трек 1
- X-Instance-Id, обязательный Idempotency-Key (PostgreSQL, одна транзакция)
- HAProxy + 2..N реплик API, readiness/drain по SIGTERM, однократные миграции
- скрипты stop-one/restore/restart/rolling-update/collect-evidence
- трек 1: параметризованный стенд, cmd/bench, оркестратор и анализ
- workflow реального прогона Docker-стенда на GitHub Actions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:24:54 +03:00

17 lines
515 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
set -eu
# Перезапускает API, LB и все хранилища (PostgreSQL, Redis) с сохранением volumes.
# Никаких down -v / FLUSH / повторного seed.
cd "$(dirname "$0")/.."
docker compose stop lb api
docker compose restart postgres redis
until docker compose exec -T postgres pg_isready -U messenger -d messenger >/dev/null 2>&1; do
sleep 1
done
until docker compose exec -T redis redis-cli ping >/dev/null 2>&1; do
sleep 1
done
docker compose start api lb