From 6e8e1d040ad30d8c10db83c7b600799c51d15edc Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Tue, 11 Mar 2025 00:41:37 +0100 Subject: [PATCH] Specify config path directly in settings.py The original code looks for the .env file starting in the directory of the Python file itself, not the current working directory. --- bookwyrm/settings.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 5e2d063e3..234282ca0 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -12,10 +12,8 @@ from django.core.exceptions import ImproperlyConfigured # pylint: disable=line-too-long -print("Current working directory: ", os.getcwd()) - env = Env() -env.read_env() +env.read_env("/etc/bookwyrm/config.env", recurse=False) DOMAIN = env("DOMAIN") with open("VERSION", encoding="utf-8") as f: