Files
mtusi2026lab2/scripts/restart.sh
T
RainakandClaude Opus 5.5 0c5846173b
Skeleton contracts / contracts (pull_request) Canceled after 0s
ЛР2: PostgreSQL, сессии и Valkey (на 4)
API мессенджера на FastAPI + asyncpg, миграции, Argon2id, Bearer-сессии
в PostgreSQL с кэшем Valkey, compose-стенд, restart.sh, тесты уровня 4,
EXPLAIN и отчёт.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:49:32 +03:00

15 lines
768 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
# Перезапуск API и ВСЕХ используемых хранилищ (PostgreSQL, Valkey) с сохранением volumes.
# Не выполняет down -v, FLUSHALL и повторный seed. Готовность API ожидает сам тест.
set -eu
cd "$(dirname "$0")/.."
compose() { docker compose --env-file .env "$@"; }
started_at() { docker inspect -f '{{.Name}} {{.State.StartedAt}}' $(compose ps -q api postgres valkey); }
echo 'before:'; started_at
compose stop api # сначала останавливаем клиента хранилищ
compose restart postgres valkey # обычный restart контейнеров: volume pgdata остаётся
compose start api
echo 'after:'; started_at