Реализация лабораторной 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
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# Separate short-TTL stand used by `make test-ttl`.
# It is a distinct Compose project on its own port with its own disposable
# volumes, so the main stand and its synthetic data are untouched.
set -eu
cd "$(dirname "$0")/.."
PROJECT="${TTL_PROJECT:-mtusi-lab2-ttl}"
PORT="${TTL_PORT:-8081}"
ACTION="${1:-}"
case "$ACTION" in
start)
SESSION_TTL_SECONDS=2 API_PUBLISH_PORT="$PORT" \
docker compose -p "$PROJECT" --env-file .env up -d --wait --wait-timeout 180
printf 'ttl_stack_ready base_url=http://127.0.0.1:%s session_ttl_seconds=2\n' "$PORT"
;;
stop)
# -v removes only this dedicated synthetic stand's volumes.
docker compose -p "$PROJECT" --env-file .env down -v --timeout 10
printf 'ttl_stack_removed\n'
;;
*)
printf 'usage: %s start|stop\n' "$0" >&2
exit 2
;;
esac