Реализация лабораторной 2: PostgreSQL, сессии, Valkey-кэш
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user