mirror of
https://github.com/fspc/workstand.git
synced 2025-02-23 17:23:24 -05:00
Production settings.
This commit is contained in:
parent
2319c4a494
commit
d21b8cab7b
49
bikeshop_project/bikeshop/settings/production.py
Normal file
49
bikeshop_project/bikeshop/settings/production.py
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
from .base import *
|
||||||
|
|
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
|
WSGI_APPLICATION = 'bikeshop.wsgi.application'
|
||||||
|
|
||||||
|
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
|
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
|
DEBUG = False
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = ['shop.bcbc.bike']
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
|
'NAME': 'bikeshop_production',
|
||||||
|
'USER': 'bikeshop',
|
||||||
|
'PASSWORD': os.environ['DJANGO_DB_PASSWORD'],
|
||||||
|
'HOST': '127.0.0.1',
|
||||||
|
'PORT': '5432',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'handlers': {
|
||||||
|
'console': {
|
||||||
|
'class': 'logging.StreamHandler',
|
||||||
|
'formatter': 'verbose'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'formatters': {
|
||||||
|
'verbose': {
|
||||||
|
'format': '%(levelname)s %(asctime)s %(pathname)s %(message)s'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'django': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': os.getenv('DJANGO_LOG_LEVEL', 'ERROR'),
|
||||||
|
},
|
||||||
|
'bikeshop': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user