} # You should not change this setting after your database has been created # unless you have altered all schemas first SENTRY_USE_BIG_INTS = True # If you're expecting any kind of real traffic on Sentry, we highly recommend # configuring the CACHES and Redis settings ########### # General # ########### # Instruct Sentry that this install intends to be run by a single organization # and thus various UI optimizations should be enabled. SENTRY_SINGLE_ORGANIZATION = Bool(env('SENTRY_SINGLE_ORGANIZATION', True)) ######### # Redis # ######### # Generic Redis configuration used as defaults for various things including: # Buffers, Quotas, TSDB 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?' )
def test_bool(self): assert Bool(True) is True assert Bool(1) is True assert Bool("y") is True assert Bool("YES") is True assert Bool("t") is True assert Bool("true") is True assert Bool("1") is True assert Bool("on") is True assert Bool(False) is False assert Bool(0) is False assert Bool("n") is False assert Bool("NO") is False assert Bool("f") is False assert Bool("false") is False assert Bool("0") is False assert Bool("off") is False assert Bool() is False assert Bool.test(None) is False assert Bool(True) is True assert Bool.test("foo") is False with self.assertRaises(InvalidTypeError): Bool("foo")
} # You should not change this setting after your database has been created # unless you have altered all schemas first SENTRY_USE_BIG_INTS = True # If you're expecting any kind of real traffic on Sentry, we highly recommend # configuring the CACHES and Redis settings ########### # General # ########### # Instruct Sentry that this install intends to be run by a single organization # and thus various UI optimizations should be enabled. SENTRY_SINGLE_ORGANIZATION = Bool(env("SENTRY_SINGLE_ORGANIZATION", True)) ######### # Redis # ######### # Generic Redis configuration used as defaults for various things including: # Buffers, Quotas, TSDB 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?" )
} # You should not change this setting after your database has been created # unless you have altered all schemas first SENTRY_USE_BIG_INTS = True # If you're expecting any kind of real traffic on Sentry, we highly recommend # configuring the CACHES and Redis settings ########### # General # ########### # Instruct Sentry that this install intends to be run by a single organization # and thus various UI optimizations should be enabled. SENTRY_SINGLE_ORGANIZATION = Bool(os.environ.get('SENTRY_SINGLE_ORGANIZATION', True)) ######### # Redis # ######### # Generic Redis configuration used as defaults for various things including: # Buffers, Quotas, TSDB redis = os.environ.get('SENTRY_REDIS_HOST') or (os.environ.get('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_port = os.environ.get('SENTRY_REDIS_PORT') or '6379' redis_db = os.environ.get('SENTRY_REDIS_DB') or '0'
def test_bool(self): assert Bool(True) is True assert Bool('y') is True assert Bool('YES') is True assert Bool('t') is True assert Bool('true') is True assert Bool('1') is True assert Bool(False) is False assert Bool('n') is False assert Bool('NO') is False assert Bool('f') is False assert Bool('false') is False assert Bool('0') is False assert Bool() is False assert Bool.test(None) is False assert Bool(True) is True assert Bool.test('foo') is False with self.assertRaises(InvalidTypeError): Bool('foo')
CSRF_COOKIE_SECURE = True ############### # Mail Server # ############### email = os.environ.get('SENTRY_EMAIL_HOST') if email: SENTRY_OPTIONS['mail.backend'] = 'smtp' SENTRY_OPTIONS['mail.host'] = email SENTRY_OPTIONS['mail.password'] = os.environ.get( 'SENTRY_EMAIL_PASSWORD') or '' SENTRY_OPTIONS['mail.username'] = os.environ.get('SENTRY_EMAIL_USER') or '' SENTRY_OPTIONS['mail.port'] = int( os.environ.get('SENTRY_EMAIL_PORT') or 25) SENTRY_OPTIONS['mail.use-tls'] = Bool( os.environ.get('SENTRY_EMAIL_USE_TLS', False)) else: SENTRY_OPTIONS['mail.backend'] = 'dummy' SENTRY_OPTIONS['mail.host'] = 'localhost' SENTRY_OPTIONS['mail.password'] = '' SENTRY_OPTIONS['mail.username'] = '' SENTRY_OPTIONS['mail.port'] = 25 SENTRY_OPTIONS['mail.use-tls'] = False # The email address to send on behalf of SENTRY_OPTIONS['mail.from'] = os.environ.get( 'SENTRY_SERVER_EMAIL') or 'root@localhost' # If you're using mailgun for inbound mail, set your API key and configure a # route to forward to /api/hooks/mailgun/inbound/ MAILGUN_API_KEY = os.environ.get('SENTRY_MAILGUN_API_KEY') or ''
}) SENTRY_CACHE = 'sentry.cache.redis.RedisCache' BROKER_URL = "redis://:{password}@{host}:{port}/{db}".format( **SENTRY_OPTIONS["redis.clusters"]["default"]["hosts"][0]) SENTRY_RATELIMITER = 'sentry.ratelimits.redis.RedisRateLimiter' SENTRY_BUFFER = 'sentry.buffer.redis.RedisBuffer' SENTRY_QUOTAS = 'sentry.quotas.redis.RedisQuota' SENTRY_TSDB = 'sentry.tsdb.redis.RedisTSDB' if Bool(env('SENTRY_USE_SSL', False)): SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True SENTRY_WEB_HOST = "0.0.0.0" SENTRY_WEB_PORT = 9000 SENTRY_WEB_OPTIONS = { "http": "%s:%s" % (SENTRY_WEB_HOST, SENTRY_WEB_PORT), "protocol": "uwsgi", # This is needed to prevent https://git.io/fj7Lw "uwsgi-socket": None, "http-keepalive": True, "memory-report": False, "workers": 1 }
} # You should not change this setting after your database has been created # unless you have altered all schemas first SENTRY_USE_BIG_INTS = True # If you're expecting any kind of real traffic on Sentry, we highly recommend # configuring the CACHES and Redis settings ########### # General # ########### # Instruct Sentry that this install intends to be run by a single organization # and thus various UI optimizations should be enabled. SENTRY_SINGLE_ORGANIZATION = Bool('{{cfg.single-org}}') DEBUG = Bool('{{cfg.debug}}') ######### # Cache # ######### # Sentry currently utilizes two separate mechanisms. While CACHES is not a # requirement, it will optimize several high throughput patterns. # If you wish to use memcached, install the dependencies and adjust the config # as shown: # # pip install python-memcached # # CACHES = {