From c4723ddf64afdacb0637830647a9a4e7f1a1f267 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Sat, 1 Apr 2017 14:26:34 -0400 Subject: [PATCH] add production example --- .gitignore | 1 - stagestatus/settings/production.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 stagestatus/settings/production.py diff --git a/.gitignore b/.gitignore index 9f24f18..73580f8 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ venv *.iws stagestatus/settings/local.py -stagestatus/settings/production.py # collect static output directory stagestatus/assets/ diff --git a/stagestatus/settings/production.py b/stagestatus/settings/production.py new file mode 100644 index 0000000..b874ff0 --- /dev/null +++ b/stagestatus/settings/production.py @@ -0,0 +1,21 @@ +from .base import * # noqa +import os + + +DEBUG = False +TEMPLATES['OPTIONS']['debug'] = DEBUG + +SECRET_KEY = os.environ['SECRET_KEY'] + +ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost').split(',') + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': os.environ['DB_NAME'], + 'USER': os.environ['DB_USER'], + 'PASSWORD': os.environ.get('DB_PASSWORD', ''), + 'HOST': os.environ.get('DB_HOST', ''), + 'PORT': '', + } +}