Files
mtusi2026lab2/.env.example
T
Alexey BodanyukandClaude Opus 5.5 01524165dd feat: PostgreSQL, Bearer-сессии (Valkey/PostgreSQL), Argon2id, миграции, compose
- схема и миграции (migrations/0001_init.sql, python -m messenger.migrate);
- регистрация с паролем (Argon2id), вход по Basic, opaque Bearer, logout, expiry;
- сессии: SESSION_STORE=valkey (AOF, appendfsync always) или postgres;
- пул соединений, statement/lock timeout и клиентский дедлайн: отказ БД = 503;
- keyset-пагинация по индексу (chat_id, created_at, id), два запроса без OR;
- compose.yaml с закреплёнными образами, secrets, restart.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:24:11 +03:00

24 lines
951 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.
# The files are created by `python scripts/init_secrets.py` and mounted by compose as secrets.
DATABASE_URL_FILE=/run/secrets/database_url
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
# valkey = sessions live only in Valkey (AOF, appendfsync always); postgres = table `sessions`.
SESSION_STORE=valkey
CACHE_URL_FILE=/run/secrets/cache_url
# Additional settings of this implementation (defaults shown; all optional):
LOG_LEVEL=info
DB_POOL_MIN=1
DB_POOL_MAX=10
DB_TIMEOUT_SECONDS=3
CACHE_TIMEOUT_SECONDS=0.5
PASSWORD_HASH_CONCURRENCY=2
DOCS_ENABLED=true
# Host port of the API (compose publishes it on 127.0.0.1 only)
APP_PUBLISH_PORT=8080