From dc5ec786d9666adcafaee07453effdd8499ef2b2 Mon Sep 17 00:00:00 2001 From: vasyukova Date: Wed, 30 Sep 2026 23:08:16 +0300 Subject: [PATCH] =?UTF-8?q?*=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20DATABASE=5FURL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 +- src/app/storage/db.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index daa1b84e..b70f95ae 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/src/app/storage/db.py b/src/app/storage/db.py index c79bb874..40be8902 100644 --- a/src/app/storage/db.py +++ b/src/app/storage/db.py @@ -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