Lab2: PostgreSQL, Bearer sessions and Redis for grade 4

This commit is contained in:
2026-10-29 01:25:40 +03:00
parent 65003b6119
commit 3c5af42f24
35 changed files with 2126 additions and 25 deletions
+9 -4
View File
@@ -1,11 +1,16 @@
# 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.
SESSION_STORE=redis
# Compose mounts these secret files into the API container:
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
# Optional direct URLs for host-side tools (scripts/explain_messages.py):
# DATABASE_URL=postgresql://messenger:PASSWORD@127.0.0.1:5432/messenger
# CACHE_URL=redis://127.0.0.1:6379/0
DB_CONNECT_TIMEOUT=5
DB_POOL_MIN=1
DB_POOL_MAX=10
REDIS_SOCKET_TIMEOUT=3