chore: carry lab 3 over
- carry the lab 3 solution over from mtusi2026lab3-safronov (solution/bvt2301-safronov, ce89eba): src, migrations, student-tests, bench, openspec, .claude, infra/haproxy and infra/valkey, own scripts, Dockerfile, compose, pyproject and uv lock - merge Makefile, .gitignore and .dockerignore (the lab 3 versions only add lines to the skeleton, which is the same in lab 4) and .env.example (lab 4 skeleton names listed in the header) - rename the compose project to mtusi-lab4 and the image to :lab4 so the stand does not reuse the lab 3 containers and volumes - update AGENTS.md for lab 4: current lab, origin commit, contract and test files of the new skeleton Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
# Restart hook для make test-persistence (tests/README.md) по образцу
|
||||
# scripts/restart.example.sh; правила — .claude/rules/docker.md.
|
||||
# Перезапускает балансировщик, все реплики API и все хранилища стенда
|
||||
# (Postgres и Valkey) с сохранением volume, схемы и данных: без down -v,
|
||||
# FLUSHALL и повторного наполнения. Кэш Valkey после рестарта пуст:
|
||||
# persistence у него выключен, данные — в Postgres.
|
||||
# LB гасится первым и поднимается последним. start поднимает те же
|
||||
# контейнеры всех реплик: число реплик не меняется (реплика, остановленная
|
||||
# stop-one.sh, тоже запускается). start api запускает и его зависимость
|
||||
# migrate: повторный прогон миграций ничего не меняет.
|
||||
# Готовность через LB ждёт сам тест. Секреты не печатает.
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
docker compose stop haproxy api
|
||||
docker compose restart postgres valkey
|
||||
# те же контейнеры: --wait только дожидается их healthcheck
|
||||
docker compose up -d --wait postgres valkey
|
||||
docker compose start api haproxy
|
||||
Reference in New Issue
Block a user