diff options
author | Michael Manfre | 2022-11-08 23:05:51 -0500 |
---|---|---|
committer | GitHub | 2022-11-08 21:05:51 -0700 |
commit | 8a0a7558894afce8d25b7f0dc16775e899b72a94 (patch) | |
tree | 205c01cefcca52ded01e054810932e1ac39375a1 /takahe | |
parent | 54e1b1f93a81b93e24ee8dc70d41bd95ff782ba2 (diff) | |
download | takahe-8a0a7558894afce8d25b7f0dc16775e899b72a94.tar.gz takahe-8a0a7558894afce8d25b7f0dc16775e899b72a94.tar.bz2 takahe-8a0a7558894afce8d25b7f0dc16775e899b72a94.zip |
Add basic docker support
Diffstat (limited to 'takahe')
-rw-r--r-- | takahe/settings.py | 9 |
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"), } } |