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': '', + } +}