* исправила DATABASE_URL

This commit is contained in:
vasyukova
2026-09-30 23:08:16 +03:00
parent 82766a5337
commit dc5ec786d9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ APP_PORT=8080
APP_ENV=lab
SESSION_TTL_SECONDS=3600
# Choose credentials locally. File paths contain no secret values.
DATABASE_URL_FILE=postgresql://user:password@localhost:5432/high_load_messenger
DATABASE_URL=postgresql://user:password@localhost:5432/high_load_messenger
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
+2 -2
View File
@@ -6,9 +6,9 @@ import psycopg
def _dsn() -> str:
dsn = os.environ.get("DATABASE_URL_FILE")
dsn = os.environ.get("DATABASE_URL")
if not dsn:
raise RuntimeError("DATABASE_URL_FILE is not set")
raise RuntimeError("DATABASE_URL is not set")
return dsn