From dda35341e64e0560ea522ad98bd78e37bc71ec75 Mon Sep 17 00:00:00 2001 From: Paul McLanahan Date: Sun, 11 May 2014 00:43:27 -0400 Subject: [PATCH] Add server settings to repo. --- settings/__init__.py | 4 ++-- settings/server.py | 55 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 settings/server.py diff --git a/settings/__init__.py b/settings/__init__.py index 8735592..63632b0 100644 --- a/settings/__init__.py +++ b/settings/__init__.py @@ -5,8 +5,8 @@ import os import sys -if 'HEROKU' in os.environ: - from .heroku import * +if 'SERVER_ENV' in os.environ: + from .server import * elif 'TRAVIS' in os.environ: from .travis import * else: diff --git a/settings/server.py b/settings/server.py new file mode 100644 index 0000000..7b8ae0a --- /dev/null +++ b/settings/server.py @@ -0,0 +1,55 @@ +from __future__ import absolute_import + +import os + +import dj_database_url + +from .base import * # noqa + +ENFORCE_HOSTNAME = 'scrumbu.gs' +ENABLE_GA = True +SITE_URL = 'https://scrumbu.gs' +ALLOWED_HOSTS = ['scrumbu.gs'] +PROD_MODE = True +BROWSERID_AUDIENCES = [ + 'https://scrumbu.gs', +] + +DATABASES = {'default': dj_database_url.config()} +CACHES['default']['LOCATION'] = [ + 'amy:11211', + 'fry:11211', +] + +SECRET_KEY = os.getenv('SECRET_KEY') + +SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = True +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') + +# Static media +STATICFILES_STORAGE = 'scrum.storage.GzipManifestPipelineStorage' +BUGMAIL_API_KEY = os.getenv('BUGMAIL_API_KEY') +STATIC_URL = os.getenv('STATIC_URL') + +# Celery +BROKER_URL = os.getenv('BROKER_URL') +CELERY_RESULT_BACKEND = BROKER_URL + +# SENTRY +SENTRY_DSN = os.getenv('SENTRY_DSN') +MORE_APPS = ['raven.contrib.django'] +SENTRY_AUTO_LOG_STACKS = True + +INSTALLED_APPS += tuple(MORE_APPS) + +if os.environ.get('BUGZILLA_BASE_URL'): + BUGZILLA_BASE_URL = os.environ['BUGZILLA_BASE_URL'] + BUG_OPEN_STATUSES = [ + 'UNCONFIRMED', + 'CONFIRMED', + 'IN_PROGRESS', + ] + BUG_CLOSED_STATUSES = [ + 'RESOLVED', + 'VERIFIED', + ]