From 3edf7201487638cff77d0758d8bc47914aadc92f Mon Sep 17 00:00:00 2001 From: "Webmaster Polytechnique.org" Date: Fri, 5 Apr 2013 22:11:47 +0200 Subject: [PATCH] Add base configuration --- .gitignore | 1 + requirements.txt | 1 + xorg_sentry/conf.py | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 requirements.txt create mode 100644 xorg_sentry/conf.py diff --git a/.gitignore b/.gitignore index cb34bf6..464c794 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.py[co] .*.swp +xorg_sentry/private/ venv/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ae2c7bc --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +sentry diff --git a/xorg_sentry/conf.py b/xorg_sentry/conf.py new file mode 100644 index 0000000..368a87d --- /dev/null +++ b/xorg_sentry/conf.py @@ -0,0 +1,78 @@ +# Configuration for xorg_sentry. + +from sentry.conf.server import * + + +# Cleanup social_auth-related stuff +# ================================= + +EXCLUDED_APPS = ('djcelery', 'kombu.transport.django', 'social_auth', 'django_social_auth_trello') +INSTALLED_APPS = tuple(app for app in INSTALLED_APPS if app not in EXCLUDED_APPS) + +AUTHENTICATION_BACKENDS = ( + 'sentry.utils.auth.EmailAuthBackend', +) + +TEMPLATE_CONTEXT_PROCESSORS = tuple( + tcp for tcp in TEMPLATE_CONTEXT_PROCESSORS if 'social_auth' not in tcp) + + +# Reading password +# ================ + +import os.path + +CONF_ROOT = os.path.dirname(__file__) + +def get_password(filename): + with open(os.path.join(CONF_ROOT, 'private', filename)) as f: + return f.readline() + + +# Actual configuration +# ==================== + +DATABASES = { + 'default': { + # You can swap out the engine for MySQL easily by changing this value + # to ``django.db.backends.mysql`` or to PostgreSQL with + # ``django.db.backends.postgresql_psycopg2`` + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'sentry', + 'USER': 'sentry', + 'PASSWORD': get_password('mysql_key'), + 'HOST': '', + 'PORT': '', + } +} + +SENTRY_KEY = get_password('secret_key') + +# Set this to false to require authentication +SENTRY_PUBLIC = True + +# You should configure the absolute URI to Sentry. It will attempt to guess it if you don't +# but proxies may interfere with this. +# SENTRY_URL_PREFIX = 'http://sentry.example.com' # No trailing slash! +SENTRY_URL_PREFIX = 'https://errors.polytechnique.org' + +SENTRY_WEB_HOST = '0.0.0.0' +SENTRY_WEB_PORT = 9000 +SENTRY_WEB_OPTIONS = { + 'workers': 3, # the number of gunicorn workers + # 'worker_class': 'gevent', +} + +# Mail server configuration + +# For more information check Django's documentation: +# https://docs.djangoproject.com/en/1.3/topics/email/?from=olddocs#e-mail-backends + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' + +EMAIL_HOST = 'localhost' +EMAIL_HOST_PASSWORD = '' +EMAIL_HOST_USER = '' +EMAIL_PORT = 25 +EMAIL_USE_TLS = False + -- 2.1.4