# Beware that the quotes around the values are mandatory

### Secret key for the Flask application
SECRET_KEY='{{ fedocal_secret_key }}'

### url to the database server:
#DB_URL=mysql://user:pass@host/db_name
#DB_URL=postgres://user:pass@host/db_name
#DB_URL="postgresql://<%= fedocal_app %>:<%= fedocal_appPassword %>@db-fedocal/fedocal"
{% if env == 'staging' %}
DB_URL='postgresql://{{ fedocal_db_user }}:{{ fedocal_stg_db_pass }}@db01.stg.iad2.fedoraproject.org/{{ fedocal_db_name }}'
{% else %}
DB_URL='postgresql://{{ fedocal_db_user }}:{{ fedocal_db_pass }}@db01.iad2.fedoraproject.org/{{ fedocal_db_name }}'
{% endif %}


OIDC_CLIENT_SECRETS = '/opt/app-root/secret/client_secrets.json'

### The FAS group in which the admin of fedocal are
ADMIN_GROUP='sysadmin-calendar'

### The address of the SMTP server used to send the reminders emails
### via the cron job.
### Default: 'localhost'
{% if env == 'staging' %}
SMTP_SERVER='localhost'
{% else %}
SMTP_SERVER='bastion.fedoraproject.org'
{% endif %}

### The cron job can be set with any frequency but fedocal_cron needs
### this information to accurately retrieve the meetings to remind and
### avoid sending multiple reminders for a single meeting.
### Default: 30
CRON_FREQUENCY=30

### Path to the alembic configuration file
### When creating the database, we need to tell the database which
### revision of alembic we are at and to do this we need access to the
### alembic.ini file.
PATH_ALEMBIC_INI='/opt/app-root/config/alembic.ini'

# This is required to fix login
PREFERRED_URL_SCHEME='https'

# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_NAME = 'fedocal'

# Used by SESSION_COOKIE_PATH
APPLICATION_ROOT = '/'

{% if env == 'staging' %}
APP_URL = 'https://calendar.stg.fedoraproject.org/' + APPLICATION_ROOT
FAS_OPENID_ENDPOINT = 'https://id.stg.fedoraproject.org/openid/'
SITE_ROOT = 'https://calendar.stg.fedoraproject.org'
SITE_URL = '%s/' % SITE_ROOT
OIDC_SCOPES = [
    'openid', 'email', 'profile',
    'https://id.fedoraproject.org/scope/agreements',
    'https://id.fedoraproject.org/scope/groups',
]
OIDC_OPENID_REALM = '%s/oidc_callback' % SITE_ROOT
{% else %}
APP_URL = 'https://calendar.fedoraproject.org/' + APPLICATION_ROOT
SITE_ROOT = 'https://calendar.fedoraproject.org'
SITE_URL = '%s/' % SITE_ROOT
OIDC_SCOPES = [
    'openid', 'email', 'profile',
    'https://id.fedoraproject.org/scope/agreements',
    'https://id.fedoraproject.org/scope/groups',
]
OIDC_OPENID_REALM = '%s/oidc_callback' % SITE_ROOT
{% endif %}
