Skip to content

Commit

Permalink
Add server settings to repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed May 11, 2014
1 parent f70d775 commit dda3534
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
4 changes: 2 additions & 2 deletions settings/__init__.py
Expand Up @@ -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:
Expand Down
55 changes: 55 additions & 0 deletions 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',
]

0 comments on commit dda3534

Please sign in to comment.