add production example

This commit is contained in:
Tyrel Souza 2017-04-01 14:26:34 -04:00
parent f4c04becaa
commit c4723ddf64
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
2 changed files with 21 additions and 1 deletions

1
.gitignore vendored
View File

@ -56,7 +56,6 @@ venv
*.iws
stagestatus/settings/local.py
stagestatus/settings/production.py
# collect static output directory
stagestatus/assets/

View File

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