summaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
authorsyn <isaqtm@gmail.com>2020-03-18 12:25:03 +0300
committersyn <isaqtm@gmail.com>2020-03-18 12:25:03 +0300
commitc8a027ef282962584c5155a9015b644ad197d9c8 (patch)
treeb7a74ce6bbd6422a06ae33c7e51add268546c950 /config.py
parent9825d2ad0dacc1d281924b634f17b157c1f36da3 (diff)
downloadblure-c8a027ef282962584c5155a9015b644ad197d9c8.tar.gz
Configure db from docker-compose
Diffstat (limited to 'config.py')
-rw-r--r--config.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.py b/config.py
index ef895ba..dca2efc 100644
--- a/config.py
+++ b/config.py
@@ -1,10 +1,14 @@
from uuid import UUID
+from os import environ
host = '0.0.0.0'
port = 80
debug = True
-PG_URI = 'postgres://postgres:secure@pg'
+pg_user = environ.get('POSTGRES_USER') or 'postgres'
+pg_pass = environ.get('POSTGRES_PASSWORD') or ''
+PG_URI = f'postgres://{pg_user}:{pg_pass}@pg'
+
APP_SECRET = UUID('8036587d-11ea-4c59-af9b-9da52eded1bc').bytes