реализован уровень 4

This commit is contained in:
2026-10-15 20:12:22 +03:00
parent 158fed100c
commit 09b4b1d49d
25 changed files with 1794 additions and 91 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
project_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$project_root"
env_file=${ENV_FILE:-.env}
case "${SESSION_TTL_ACTION:-}" in
short)
ttl=${SHORT_SESSION_TTL_SECONDS:-2}
case "$ttl" in
''|*[!0-9]*|0)
echo "SHORT_SESSION_TTL_SECONDS must be a positive integer" >&2
exit 2
;;
esac
SESSION_TTL_SECONDS="$ttl" docker compose --env-file "$env_file" \
up -d --no-deps --force-recreate --wait api
;;
restore)
docker compose --env-file "$env_file" \
up -d --no-deps --force-recreate --wait api
;;
*)
echo "SESSION_TTL_ACTION must be short or restore" >&2
exit 2
;;
esac