1
0
Fork 0

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.
This commit is contained in:
Reinout Meliesie 2025-03-11 00:41:37 +01:00
parent 750b4c762c
commit 6e8e1d040a
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6

View file

@ -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: