Реализация лабораторной 2: PostgreSQL, сессии, Valkey-кэш
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Tmribob
2026-10-30 19:37:21 +03:00
parent 65003b6119
commit 3df9b09896
44 changed files with 3519 additions and 17 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Restart hook for `make test-persistence ACTION_SCRIPT=scripts/restart.sh`.
# Recreates the API and BOTH state stores from the same images, keeping the
# named volumes (pgdata, valkeydata): no `down -v`, no seed, no data reset.
set -eu
cd "$(dirname "$0")/.."
ENV_FILE="${COMPOSE_ENV_FILE:-.env}"
printf '%s\n' "restart: stopping api, postgres and valkey (volumes preserved)"
docker compose --env-file "$ENV_FILE" down --timeout 15
printf '%s\n' "restart: starting api, postgres and valkey"
docker compose --env-file "$ENV_FILE" up -d --wait --wait-timeout 120
docker compose --env-file "$ENV_FILE" ps
printf '%s\n' "stack_restarted volumes_preserved"