[global]
debug = {{ (env == 'production')|ternary('False', 'True') }}
tools.log_request_response.on = False
theme_dir = "/usr/share/ipsilon/themes/Fedora"
template_dir = "/usr/share/ipsilon/templates"
base.dir = "/usr/share/ipsilon"
cache_dir = "/var/cache/ipsilon"
cleanup_interval = 30
db.conn.log = False
db.echo = False
# base.mount = ""
admin.config.db = "configfile:///etc/ipsilon/root/configuration.conf"
{% if env == 'staging' %}
user.prefs.db = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_stg_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_prefs_name }}"
transactions.db = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_stg_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_transactions_name }}"
{% else %}
user.prefs.db = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_prefs_name }}"
transactions.db = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_transactions_name }}"
{% endif %}

tools.sessions.on = True
tools.sessions.name = "fedora_ipsilon_session_id"
tools.sessions.storage_type = "sql"
{% if env == 'staging' %}
tools.sessions.storage_dburi = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_stg_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_sessions_name }}"
{% else %}
tools.sessions.storage_dburi = "postgresql://{{ ipsilon_db_user }}:{{ ipsilon_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_sessions_name }}"
{% endif %}
tools.sessions.timeout = 15
tools.sessions.httponly = True
tools.sessions.secure = True
tools.sessions.locking = 'explicit'

tools.proxy.on = True
tools.proxy.base = "https://id{{ env_suffix }}.fedoraproject.org"

