Files
mtusi2026lab4/scripts/restart.sh
T
ricoromaandClaude Opus 5.5 2e997f9b42 feat: add private S3 storage (SeaweedFS) with bootstrap and client
- s3 and s3-bootstrap services: SeaweedFS 4.48 pinned by digest,
  internals on loopback, signing key, private bucket, API user policy,
  privacy checks on every bootstrap
- [s3] settings and aiobotocore client in src/infra/s3: deadline per
  call, no retries, 503 on outage or rejected credentials
- make start_s3, stop_s3, s3_check; run_dev, test_isolated, wipe_data
  and restart hook include S3
- failure_checks with own S3 and readiness check without it; bench
  generates S3 secrets and filters them out of the passport
- rules, AGENTS.md, skill; sync health delta; KNOWN_ISSUES: rollout_from

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:12:04 +03:00

23 lines
1.6 KiB
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
# Restart hook для make test-persistence (tests/README.md) по образцу
# scripts/restart.example.sh; правила — .claude/rules/docker.md.
# Перезапускает балансировщик, все реплики API и все хранилища стенда
# (Postgres, Valkey и S3) с сохранением volumes, схемы и данных: без
# down -v, FLUSHALL и повторного наполнения. Кэш Valkey после рестарта
# пуст: persistence у него выключен, данные — в Postgres. Bucket, учётные
# записи и объекты S3 лежат в его volume.
# LB гасится первым и поднимается последним. start поднимает те же
# контейнеры всех реплик: число реплик не меняется (реплика, остановленная
# stop-one.sh, тоже запускается). start api запускает и его зависимости
# migrate и s3-bootstrap: повторные миграции и bootstrap ничего не меняют.
# S3 останавливается плавно ~15 с (stop_grace_period 20 с): hook занимает
# ~30–35 с. Готовность через LB ждёт сам тест. Секреты не печатает.
cd "$(dirname "$0")/.."
docker compose stop haproxy api
docker compose restart postgres valkey s3
# те же контейнеры: --wait только дожидается их healthcheck
docker compose up -d --wait postgres valkey s3
docker compose start api haproxy