Реализация лабораторной 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
+14
View File
@@ -1,3 +1,4 @@
[TEMPLATE]
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
APP_HOST=0.0.0.0
@@ -9,3 +10,16 @@ DATABASE_URL_FILE=/run/secrets/database_url
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
# --- lab 2 implementation knobs (mapped in REPORT.md) ---
# Valkey entry lifetime is additionally capped by the session's remaining life.
CACHE_TTL_SECONDS=300
# Bounded PostgreSQL pool and explicit timeouts.
DB_POOL_MIN=1
DB_POOL_MAX=10
DB_POOL_TIMEOUT_SECONDS=2
DB_CONNECT_TIMEOUT_SECONDS=2
DB_STATEMENT_TIMEOUT_MS=5000
# Valkey operations fail over to PostgreSQL after this per-call timeout.
CACHE_TIMEOUT_SECONDS=0.5
# Host port used by compose; the TTL stand uses 8081.
API_PUBLISH_PORT=8080