diff --git a/config.yml b/config.yml index 433b9dc..8a08445 100644 --- a/config.yml +++ b/config.yml @@ -44,3 +44,20 @@ # 0: # host: 127.0.0.1 # port: 6379 + +################ +# File storage # +################ + +# Uploaded media uses these `filestore` settings. The available +# backends are either `filesystem` or `s3`. + +# filestore.backend: 'filesystem' +# filestore.options: +# location: '/tmp/sentry-files' + +# filestore.backend: 's3' +# filestore.options: +# access_key: 'AKIXXXXXX' +# secret_key: 'XXXXXXX' +# bucket_name: 's3-bucket-name' diff --git a/sentry.conf.py b/sentry.conf.py index b9f5e21..9176307 100644 --- a/sentry.conf.py +++ b/sentry.conf.py @@ -12,6 +12,7 @@ # SENTRY_RABBITMQ_PASSWORD # SENTRY_RABBITMQ_VHOST # SENTRY_REDIS_HOST +# SENTRY_REDIS_PASSWORD # SENTRY_REDIS_PORT # SENTRY_REDIS_DB # SENTRY_MEMCACHED_HOST @@ -28,6 +29,10 @@ # SENTRY_MAILGUN_API_KEY # SENTRY_SINGLE_ORGANIZATION # SENTRY_SECRET_KEY +# GITHUB_APP_ID +# GITHUB_API_SECRET +# BITBUCKET_CONSUMER_KEY +# BITBUCKET_CONSUMER_SECRET from sentry.conf.server import * # NOQA from sentry.utils.types import Bool @@ -94,6 +99,7 @@ redis = env('SENTRY_REDIS_HOST') or (env('REDIS_PORT_6379_TCP_ADDR') and 'redis' if not redis: raise Exception('Error: REDIS_PORT_6379_TCP_ADDR (or SENTRY_REDIS_HOST) is undefined, did you forget to `--link` a redis container?') +redis_password = env('SENTRY_REDIS_PASSWORD') or '' redis_port = env('SENTRY_REDIS_PORT') or '6379' redis_db = env('SENTRY_REDIS_DB') or '0' @@ -103,6 +109,7 @@ SENTRY_OPTIONS.update({ 'hosts': { 0: { 'host': redis, + 'password': redis_password, 'port': redis_port, 'db': redis_db, }, @@ -162,7 +169,7 @@ if rabbitmq: ) ) else: - BROKER_URL = 'redis://' + redis + ':' + redis_port + '/' + redis_db + BROKER_URL = 'redis://:' + redis_password + '@' + redis + ':' + redis_port + '/' + redis_db ############### @@ -215,11 +222,11 @@ SENTRY_DIGESTS = 'sentry.digests.backends.redis.RedisBackend' # File storage # ################ -# Any Django storage backend is compatible with Sentry. For more solutions see -# the django-storages package: https://django-storages.readthedocs.org/en/latest/ +# Uploaded media uses these `filestore` settings. The available +# backends are either `filesystem` or `s3`. -SENTRY_FILESTORE = 'django.core.files.storage.FileSystemStorage' -SENTRY_FILESTORE_OPTIONS = { +SENTRY_OPTIONS['filestore.backend'] = 'filesystem' +SENTRY_OPTIONS['filestore.options'] = { 'location': env('SENTRY_FILESTORE_DIR'), } @@ -234,6 +241,7 @@ if Bool(env('SENTRY_USE_SSL', False)): SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True + SOCIAL_AUTH_REDIRECT_IS_HTTPS = True SENTRY_WEB_HOST = '0.0.0.0' SENTRY_WEB_PORT = 9000 @@ -289,3 +297,12 @@ if 'SENTRY_RUNNING_UWSGI' not in os.environ and len(secret_key) < 32: print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') SENTRY_OPTIONS['system.secret-key'] = secret_key + +if 'GITHUB_APP_ID' in os.environ: + GITHUB_EXTENDED_PERMISSIONS = ['repo'] + GITHUB_APP_ID = env('GITHUB_APP_ID') + GITHUB_API_SECRET = env('GITHUB_API_SECRET') + +if 'BITBUCKET_CONSUMER_KEY' in os.environ: + BITBUCKET_CONSUMER_KEY = env('BITBUCKET_CONSUMER_KEY') + BITBUCKET_CONSUMER_SECRET = env('BITBUCKET_CONSUMER_SECRET')