From 245f3d09a8d97ea30bba5cf8f4af4c9546f351e2 Mon Sep 17 00:00:00 2001 From: Tony Hendrick Date: Tue, 12 May 2020 15:08:01 -0700 Subject: [PATCH] Change settings.py and config.json to use an external PostgresDB --- config.json | 2 +- src/frontend/settings.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 71951be..be6ecb6 100755 --- a/config.json +++ b/config.json @@ -1 +1 @@ -{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"} +{"TITLE": "pyShelf E-Book Server", "VERSION": "0.5.0", "BOOKPATH": "", "DB_HOST": "db", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "mysecretpassword", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"} diff --git a/src/frontend/settings.py b/src/frontend/settings.py index 6fe29bb..470ce96 100755 --- a/src/frontend/settings.py +++ b/src/frontend/settings.py @@ -99,6 +99,8 @@ DATABASES = { "NAME": CONFIG.catalogue_db, "USER": "pyshelf", "PASSWORD": CONFIG.password, + "HOST": CONFIG.db_host, + "PORT": CONFIG.db_port, } }