Files
mtusi2026lab2/.env.example
T
RainakandClaude Opus 5.5 0c5846173b
Skeleton contracts / contracts (pull_request) Canceled after 0s
ЛР2: PostgreSQL, сессии и Valkey (на 4)
API мессенджера на FastAPI + asyncpg, миграции, Argon2id, Bearer-сессии
в PostgreSQL с кэшем Valkey, compose-стенд, restart.sh, тесты уровня 4,
EXPLAIN и отчёт.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:49:32 +03:00

25 lines
994 B
Bash

# 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
APP_PORT=8080
APP_ENV=lab
SESSION_TTL_SECONDS=3600
# Choose credentials locally. File paths contain no secret values.
DATABASE_URL_FILE=/run/secrets/database_url
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
# postgres - sessions only in PostgreSQL
# postgres+valkey - PostgreSQL is the source of truth, Valkey is a read-through session cache with TTL
SESSION_STORE=postgres+valkey
CACHE_URL_FILE=/run/secrets/cache_url
# Max lifetime of a cached session copy (also the cache-distrust window after a Valkey error)
SESSION_CACHE_TTL_SECONDS=60
# Bounded pool and timeouts
DB_POOL_MAX=10
DB_STATEMENT_TIMEOUT_MS=5000
DB_ACQUIRE_TIMEOUT_MS=2000
CACHE_TIMEOUT_MS=300
# Parallel Argon2id computations (each uses 64 MiB)
PASSWORD_HASH_WORKERS=4
# Host port bound to 127.0.0.1
API_PUBLISHED_PORT=8080