ЛР 2: PostgreSQL, сессии и Bearer-аутентификация (оценка 3)

This commit is contained in:
Яковлев Матвей Дмитриевич
2026-11-16 23:16:10 +01:00
parent 65003b6119
commit 975b46b8d2
15 changed files with 1035 additions and 21 deletions
+14 -6
View File
@@ -1,11 +1,19 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
# Values below are placeholders, not secrets. Choose your own local values.
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
# Compose / PostgreSQL (lab2 level 3: sessions also live in PostgreSQL)
POSTGRES_USER=messenger
POSTGRES_PASSWORD=replace-with-local-synthetic-password
POSTGRES_DB=messenger
DATABASE_URL=postgresql://messenger:replace-with-local-synthetic-password@db:5432/messenger
# Alternative for deployments that mount a secret file instead of an env variable:
# DATABASE_URL_FILE=/run/secrets/database_url
# Optional on level 3. Not used by this solution (SESSION_STORE=postgres).
# SESSION_STORE=postgres
# CACHE_URL_FILE=/run/secrets/cache_url