From d12f0642f235520f8ce97e61487d0b845479fa33 Mon Sep 17 00:00:00 2001 From: Scott Peshak Date: Sun, 2 Dec 2018 15:20:29 -0600 Subject: [PATCH] Add DBHOST & DBPORT parameters Resolves #445 --- src/paperless/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 97226ef44..54e984eb6 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -152,6 +152,10 @@ if os.getenv("PAPERLESS_DBUSER"): } if os.getenv("PAPERLESS_DBPASS"): DATABASES["default"]["PASSWORD"] = os.getenv("PAPERLESS_DBPASS") + if os.getenv("PAPERLESS_DBHOST"): + DATABASES["default"]["HOST"] = os.getenv("PAPERLESS_DBHOST") + if os.getenv("PAPERLESS_DBPORT"): + DATABASES["default"]["PORT"] = os.getenv("PAPERLESS_DBPORT") # Password validation