From e8124806b163bd0d0c00ae6f10d0bb1de2c3b13c Mon Sep 17 00:00:00 2001 From: bcj Date: Mon, 17 May 2021 00:03:11 -0500 Subject: [PATCH] Don't hardcode postres port in bookwyrm.settings Have bookwyrm.settings check for an alternative postgres port. --- .env.prod.example | 1 + bookwyrm/settings.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.prod.example b/.env.prod.example index ac9fe70f8..a82499a32 100644 --- a/.env.prod.example +++ b/.env.prod.example @@ -21,6 +21,7 @@ BOOKWYRM_DATABASE_BACKEND=postgres MEDIA_ROOT=images/ +POSTGRES_PORT=5432 POSTGRES_PASSWORD=securedbpassword123 POSTGRES_USER=fedireads POSTGRES_DB=fedireads diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 45d8cb9d6..d694e33fd 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -118,7 +118,7 @@ BOOKWYRM_DBS = { "USER": env("POSTGRES_USER", "fedireads"), "PASSWORD": env("POSTGRES_PASSWORD", "fedireads"), "HOST": env("POSTGRES_HOST", ""), - "PORT": 5432, + "PORT": env("POSTGRES_PORT", 5432), }, }