исправления

This commit is contained in:
2026-11-21 20:08:45 +03:00
parent e167118875
commit 815233231c
24 changed files with 1171 additions and 83 deletions
+27 -6
View File
@@ -1,11 +1,32 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# These are the variable names actually read by src/core/config.py.
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:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
# PostgreSQL. compose.yaml injects POSTGRES_HOST/REDIS_HOST for the api service.
POSTGRES_USER=messenger
POSTGRES_PASSWORD=change-me-local-only
POSTGRES_DB=messenger
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
# Redis session store (SESSION_STORE=redis is required for grade 4 in lab2).
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
SESSION_STORE=redis
# --- Timeout budgets -------------------------------------------------------
# Every dependency call has a finite timeout; the request deadline is the last
# line of defense, so a hung dependency returns 503 instead of hanging forever.
# Worst dependency path (pool wait + connect + command) stays below the
# request deadline, and the deadline stays below the 6 s observation budget.
REQUEST_TIMEOUT_SECONDS=5
DB_CONNECT_TIMEOUT_SECONDS=2
DB_COMMAND_TIMEOUT_SECONDS=3
DB_POOL_TIMEOUT_SECONDS=2
REDIS_SOCKET_TIMEOUT_SECONDS=2
REDIS_SOCKET_CONNECT_TIMEOUT_SECONDS=2
HEALTH_CHECK_TIMEOUT_SECONDS=3