mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Add ability to provide the configuration file path using an env variable
This commit is contained in:
@@ -17,7 +17,10 @@ from django.utils.translation import gettext_lazy as _
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Tap paperless.conf if it's available
|
||||
if os.path.exists("../paperless.conf"):
|
||||
configuration_path = os.getenv("PAPERLESS_CONFIGURATION_PATH")
|
||||
if configuration_path and os.path.exists(configuration_path):
|
||||
load_dotenv(configuration_path)
|
||||
elif os.path.exists("../paperless.conf"):
|
||||
load_dotenv("../paperless.conf")
|
||||
elif os.path.exists("/etc/paperless.conf"):
|
||||
load_dotenv("/etc/paperless.conf")
|
||||
|
Reference in New Issue
Block a user