summaryrefslogtreecommitdiffstats
path: root/takahe/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'takahe/settings.py')
-rw-r--r--takahe/settings.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/takahe/settings.py b/takahe/settings.py
index fea5244..62065d2 100644
--- a/takahe/settings.py
+++ b/takahe/settings.py
@@ -1,10 +1,11 @@
+import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = "insecure_secret"
+SECRET_KEY = os.environ.get("SECRET_KEY", "insecure_secret")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
@@ -64,8 +65,10 @@ WSGI_APPLICATION = "takahe.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
- "NAME": "takahe",
- "USER": "postgres",
+ "HOST": os.environ.get("POSTGRES_HOST", "localhost"),
+ "NAME": os.environ.get("POSTGRES_DB", "takahe"),
+ "USER": os.environ.get("POSTGRES_USER", "postgres"),
+ "PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
}
}