From a444f28681987efe5f551f059b612454f3f0a2d3 Mon Sep 17 00:00:00 2001 From: dbildhauer Date: Sun, 25 Oct 2026 10:55:07 +0100 Subject: [PATCH] fix: einstellungen nur aus umgebungsvariablen lesen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die .env-Datei im Arbeitsverzeichnis wurde mitgelesen. Beim Testlauf aus dem Projektordner gelangte so die Deployment-Konfiguration (LOGIN_IP_LOCKOUT=true) in die Tests. Im Container übergibt Compose die Werte ohnehin als Umgebungsvariablen. Co-Authored-By: Claude Opus 5.5 --- backend/app/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/app/config.py b/backend/app/config.py index 531ba1a..7cc08de 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -5,7 +5,9 @@ from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): - model_config = SettingsConfigDict(env_file=".env", extra="ignore") + # Only real environment variables; compose passes .env via env_file. Reading a .env + # file here would leak the deployment config into tests run from the project root. + model_config = SettingsConfigDict(extra="ignore") data_dir: Path = Path("/data") static_dir: Path = Path("/app/static")