config = {

    # Database
    {% if hubs_db_type == "postgresql" %}
    'hubs.sqlalchemy.uri': 'postgresql://{{ hubs_db_user }}:{{ hubs_db_password }}@{{ hubs_db_host }}/{{ hubs_db_name }}',
    {% else %}
    'hubs.sqlalchemy.uri': 'sqlite:///{{ hubs_var_dir }}/hubs.db',
    {% endif %}

    # Some configuration for the general hubs cache.
    "fedora-hubs.cache": {
        "backend": "dogpile.cache.dbm",
        #"expiration_time": 0,
        "arguments": {
            "filename": "{{ hubs_var_dir }}/cache.db",
        },
    },

    {% if hubs_fas_username and hubs_fas_password %}
    # FAS credentials
    'fas_credentials': {
        'username': '{{ hubs_fas_username }}',
        'password': '{{ hubs_fas_password }}',
        {% if env == "staging" %}
        'base_url': "https://admin.stg.fedoraproject.org/accounts/",
        {% endif %}
    },
    {% endif %}

    # Use fedmsg-relay to publish messages
    'active': True,
}
