Beispiel #1
0
# settings.
SETTINGS = [
    # Automatic configuration of remote services via Docker links
    DockerSetting('es.host', 'elasticsearch',
                  pattern='http://{port_9200_tcp_addr}:{port_9200_tcp_port}'),
    DockerSetting('mail.host', 'mail',
                  pattern='{port_25_tcp_addr}'),
    DockerSetting('mail.port', 'mail', pattern='{port_25_tcp_port}'),
    DockerSetting('statsd.host', 'statsd', pattern='{port_8125_udp_addr}'),
    DockerSetting('statsd.port', 'statsd', pattern='{port_8125_udp_port}'),

    # Mailer configuration for Mandrill
    mandrill_settings,

    # Configuration for external components
    EnvSetting('broker_url', 'BROKER_URL'),
    EnvSetting('es.client_poolsize', 'ELASTICSEARCH_CLIENT_POOLSIZE',
               type=int),
    EnvSetting('es.client.max_retries', 'ELASTICSEARCH_CLIENT_MAX_RETRIES', type=int),
    EnvSetting('es.client.retry_on_timeout', 'ELASTICSEARCH_CLIENT_RETRY_ON_TIMEOUT', type=asbool),
    EnvSetting('es.client.timeout', 'ELASTICSEARCH_CLIENT_TIMEOUT', type=float),
    EnvSetting('es.host', 'ELASTICSEARCH_HOST'),
    EnvSetting('es.index', 'ELASTICSEARCH_INDEX'),
    EnvSetting('es.aws.access_key_id', 'ELASTICSEARCH_AWS_ACCESS_KEY_ID'),
    EnvSetting('es.aws.region', 'ELASTICSEARCH_AWS_REGION'),
    EnvSetting('es.aws.secret_access_key', 'ELASTICSEARCH_AWS_SECRET_ACCESS_KEY'),
    EnvSetting('mail.default_sender', 'MAIL_DEFAULT_SENDER'),
    EnvSetting('mail.host', 'MAIL_HOST'),
    EnvSetting('mail.port', 'MAIL_PORT', type=int),
    EnvSetting('origins', 'ALLOWED_ORIGINS'),
    EnvSetting('sqlalchemy.url', 'DATABASE_URL', type=database_url),
Beispiel #2
0
# The default salt used for secret derivation. This is a public value, and can
# be overridden using the SECRET_SALT environment variable.
DEFAULT_SALT = (b"\xbc\x9ck!k\x81(\xb6I\xaa\x90\x0f'}\x07\xa1P\xd9\xb7\xcb"
                b"\xcb\xe8\x8b\t\xcf\xeb *\xa7\xa6\xe1i\xc7\x81\xe8\xd8\x18"
                b"\x9f\x1b\x96\xc1\xfa\x8b\x19\x82\xa3[\x19\xcb\xa4\x1a\x0f"
                b"\xe4\xcb\r\x17\x7f\xfbh\xd5^W\xdb\xe6")

# The list of all settings read from the system environment. These are in
# reverse-priority order, meaning that later settings trump earlier settings.
SETTINGS = [
    # Mailer configuration for Mandrill
    mandrill_settings,

    # Configuration for external components
    EnvSetting('broker_url', 'BROKER_URL'),
    EnvSetting('es.client_poolsize', 'ELASTICSEARCH_CLIENT_POOLSIZE',
               type=int),
    EnvSetting('es.client.max_retries', 'ELASTICSEARCH_CLIENT_MAX_RETRIES', type=int),
    EnvSetting('es.client.retry_on_timeout', 'ELASTICSEARCH_CLIENT_RETRY_ON_TIMEOUT', type=asbool),
    EnvSetting('es.client.timeout', 'ELASTICSEARCH_CLIENT_TIMEOUT', type=float),
    EnvSetting('es.host', 'ELASTICSEARCH_HOST'),
    EnvSetting('es.index', 'ELASTICSEARCH_INDEX'),
    EnvSetting('es.aws.access_key_id', 'ELASTICSEARCH_AWS_ACCESS_KEY_ID'),
    EnvSetting('es.aws.region', 'ELASTICSEARCH_AWS_REGION'),
    EnvSetting('es.aws.secret_access_key', 'ELASTICSEARCH_AWS_SECRET_ACCESS_KEY'),
    EnvSetting('mail.default_sender', 'MAIL_DEFAULT_SENDER'),
    EnvSetting('mail.host', 'MAIL_HOST'),
    EnvSetting('mail.port', 'MAIL_PORT', type=int),
    EnvSetting('sqlalchemy.url', 'DATABASE_URL', type=database_url),
    EnvSetting('statsd.host', 'STATSD_HOST'),
Beispiel #3
0
                  pattern='http://{port_9200_tcp_addr}:{port_9200_tcp_port}'),
    DockerSetting('mail.host', 'mail',
                  pattern='{port_25_tcp_addr}'),
    DockerSetting('mail.port', 'mail', pattern='{port_25_tcp_port}'),
    DockerSetting('redis.sessions.host', 'redis',
                  pattern='{port_6379_tcp_addr}'),
    DockerSetting('redis.sessions.port', 'redis',
                  pattern='{port_6379_tcp_port}'),
    DockerSetting('statsd.host', 'statsd', pattern='{port_8125_udp_addr}'),
    DockerSetting('statsd.port', 'statsd', pattern='{port_8125_udp_port}'),

    # Mailer configuration for Mandrill
    mandrill_settings,

    # Configuration for external components
    EnvSetting('broker_url', 'BROKER_URL'),
    EnvSetting('es.client_poolsize', 'ELASTICSEARCH_CLIENT_POOLSIZE',
               type=int),
    EnvSetting('es.client_timeout', 'ELASTICSEARCH_CLIENT_TIMEOUT', type=int),
    EnvSetting('es.host', 'ELASTICSEARCH_HOST'),
    EnvSetting('es.index', 'ELASTICSEARCH_INDEX'),
    EnvSetting('mail.default_sender', 'MAIL_DEFAULT_SENDER'),
    EnvSetting('mail.host', 'MAIL_HOST'),
    EnvSetting('mail.port', 'MAIL_PORT', type=int),
    EnvSetting('origins', 'ALLOWED_ORIGINS'),
    EnvSetting('redis.sessions.host', 'REDIS_HOST'),
    EnvSetting('redis.sessions.port', 'REDIS_PORT', type=int),
    EnvSetting('sqlalchemy.url', 'DATABASE_URL', type=database_url),
    EnvSetting('statsd.host', 'STATSD_HOST'),
    EnvSetting('statsd.port', 'STATSD_PORT', type=int),
Beispiel #4
0
                  'nsqd',
                  pattern='{port_4151_tcp_addr}:{port_4151_tcp_port}'),
    DockerSetting('redis.sessions.host',
                  'redis',
                  pattern='{port_6379_tcp_addr}'),
    DockerSetting('redis.sessions.port',
                  'redis',
                  pattern='{port_6379_tcp_port}'),
    DockerSetting('statsd.host', 'statsd', pattern='{port_8125_udp_addr}'),
    DockerSetting('statsd.port', 'statsd', pattern='{port_8125_udp_port}'),

    # Mailer configuration for Mandrill
    mandrill_settings,

    # Configuration for external components
    EnvSetting('es.client_poolsize', 'ELASTICSEARCH_CLIENT_POOLSIZE',
               type=int),
    EnvSetting('es.host', 'ELASTICSEARCH_HOST'),
    EnvSetting('es.index', 'ELASTICSEARCH_INDEX'),
    EnvSetting('mail.default_sender', 'MAIL_DEFAULT_SENDER'),
    EnvSetting('mail.host', 'MAIL_HOST'),
    EnvSetting('mail.port', 'MAIL_PORT', type=int),
    EnvSetting('nsq.namespace', 'NSQ_NAMESPACE'),
    EnvSetting('nsq.reader.addresses', 'NSQ_READER_ADDRS'),
    EnvSetting('nsq.writer.address', 'NSQ_WRITER_ADDR'),
    EnvSetting('origins', 'ALLOWED_ORIGINS'),
    EnvSetting('redis.sessions.host', 'REDIS_HOST'),
    EnvSetting('redis.sessions.port', 'REDIS_PORT', type=int),
    EnvSetting('sqlalchemy.url', 'DATABASE_URL', type=database_url),
    EnvSetting('statsd.host', 'STATSD_HOST'),
    EnvSetting('statsd.port', 'STATSD_PORT', type=int),