Files
fedora-infra_ansible/roles/blockerbugs/templates/blockerbugs-settings.py.j2
Kamil Páral b00d1d2f85 blockerbugs: define BLOCKERBUGS_URL and simplify the config file
BLOCKERBUGS_URL needs to be defined in order to show correct links in the
staging environment. While fixing that, realized that most of the if-else
clauses were unnecessary, because there are already group vars for that. So
simplified the config file by using the vars. KOJI_URL is dropped because it's
no longer needed.

Related: https://pagure.io/fedora-qa/blockerbugs/issue/192
2021-09-29 10:13:22 +02:00

45 lines
1.5 KiB
Django/Jinja

SECRET_KEY = '{{ blockerbugs_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ blockerbugs_db_user }}:{{ blockerbugs_db_password }}@{{ blockerbugs_db_host }}:{{ blockerbugs_db_port }}/{{ blockerbugs_db_name }}'
FAS_ADMIN_GROUP = "qa-admin"
FAS_USER = "{{ blockerbugs_fas_user }}@fedoraproject.org"
FAS_PASSWORD = "{{ blockerbugs_fas_password }}"
BUGZILLA_URL = '{{ blockerbugs_bugzilla_url }}'
BUGZILLA_XMLRPC = BUGZILLA_URL + 'xmlrpc.cgi'
BODHI_URL = '{{ blockerbugs_bodhi_url }}'
BLOCKERBUGS_URL = '{{ blockerbugs_url }}'
BLOCKERBUGS_API = "{}api/v0/".format(BLOCKERBUGS_URL)
PAGURE_URL = '{{ blockerbugs_pagure_url }}'
PAGURE_API = PAGURE_URL + '/api/0/'
PAGURE_REPO_TOKEN = "{{ blockerbugs_pagure_repo_token_secret }}"
PAGURE_REPO_WEBHOOK_KEY = "{{ blockerbugs_pagure_repo_webhook_key_secret }}"
PAGURE_REPO = "fedora-qa/blocker-review"
PAGURE_BOT_USERNAME = 'blockerbot'
{% if env == "staging" %}
FAS_FLASK_COOKIE_REQUIRES_HTTPS = False
FAS_CHECK_CERT = False
PRODUCTION = False
FAS_ENABLED = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
{% endif %}
FILE_LOGGING = False
SYSLOG_LOGGING = True
STREAM_LOGGING = True
# to fix login issue for folks who are part of many FAS groups
PREFERRED_URL_SCHEME='https'
# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE = True
# Tell flask that we're behind proxy
BEHIND_PROXY = True
# Always hide DB_URI
SHOW_DB_URI = False
# enable fedmenu
FEDMENU_URL = 'https://apps.fedoraproject.org/fedmenu/'
FEDMENU_DATA_URL = 'https://apps.fedoraproject.org/js/data.js'