Add base configuration
authorWebmaster Polytechnique.org <web@svoboda.polytechnique.org>
Fri, 5 Apr 2013 20:11:47 +0000 (22:11 +0200)
committerWebmaster Polytechnique.org <web@svoboda.polytechnique.org>
Fri, 5 Apr 2013 20:11:47 +0000 (22:11 +0200)
.gitignore
requirements.txt [new file with mode: 0644]
xorg_sentry/conf.py [new file with mode: 0644]

index cb34bf6..464c794 100644 (file)
@@ -1,4 +1,5 @@
 *.py[co]
 .*.swp
 
+xorg_sentry/private/
 venv/
diff --git a/requirements.txt b/requirements.txt
new file mode 100644 (file)
index 0000000..ae2c7bc
--- /dev/null
@@ -0,0 +1 @@
+sentry
diff --git a/xorg_sentry/conf.py b/xorg_sentry/conf.py
new file mode 100644 (file)
index 0000000..368a87d
--- /dev/null
@@ -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
+