forked from mtusi2026/mtusi2026lab2
Переносит минимум lab1 на PostgreSQL, добавляет Argon2id, Basic-вход, opaque Bearer-сессии в Valkey с TTL и AOF, строгую валидацию JSON, keyset-пагинацию по индексу, миграции, compose-стенд и собственные проверки уровня 3/4. Трек 5 — план запроса и восстановление.
39 lines
1.3 KiB
Bash
39 lines
1.3 KiB
Bash
# Local synthetic teaching stand. Copy to .env (or run `make env`, which
|
|
# generates strong random passwords and never prints them) and never commit
|
|
# the result. There are no real/production credentials in this project.
|
|
#
|
|
# Compose reads this file for interpolation; the application receives only the
|
|
# resolved values. File-based variants are supported by the binary as
|
|
# DATABASE_URL_FILE and CACHE_URL_FILE for operators that prefer mounted
|
|
# secrets; the local stand uses the ignored .env file.
|
|
|
|
# Host port published on 127.0.0.1 only. The process always listens on 8080
|
|
# inside the container/network.
|
|
HOST_PORT=8080
|
|
APP_ENV=lab
|
|
LOG_LEVEL=info
|
|
APP_VERSION=1.0.0
|
|
|
|
# PostgreSQL (named volume mtusi-lab2-melnikov-pgdata).
|
|
POSTGRES_USER=messenger
|
|
POSTGRES_DB=messenger
|
|
POSTGRES_PASSWORD=
|
|
|
|
# Valkey (named volume mtusi-lab2-melnikov-valkeydata, AOF everysec).
|
|
VALKEY_PASSWORD=
|
|
|
|
# Server-side session lifetime. The contract default is 3600; the expiry test
|
|
# temporarily starts the API with a short value.
|
|
SESSION_TTL_SECONDS=3600
|
|
|
|
# Bounded pool and timeouts (level 4).
|
|
DB_MAX_CONNS=8
|
|
DB_MIN_CONNS=1
|
|
DB_CONNECT_TIMEOUT_SECONDS=3
|
|
DB_STATEMENT_TIMEOUT_SECONDS=3
|
|
DB_QUERY_TIMEOUT_SECONDS=3
|
|
CACHE_POOL_SIZE=8
|
|
CACHE_TIMEOUT_SECONDS=2
|
|
SHUTDOWN_TIMEOUT_SECONDS=8
|
|
STARTUP_TIMEOUT_SECONDS=30
|