summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.py6
-rw-r--r--deploy/docker-compose.yml3
2 files changed, 8 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
diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml
index 8774b81..1101d9b 100644
--- a/deploy/docker-compose.yml
+++ b/deploy/docker-compose.yml
@@ -22,6 +22,9 @@ services:
pg:
container_name: pg
image: postgres:alpine
+ environment:
+ POSTGRES_USER: ${POSTGRES_USER:-postgres}
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- db_data:/var/lib/postgresql/data
networks: