waiverdb: separate config files
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
parent
8f638a7aa9
commit
771df74075
2 changed files with 19 additions and 17 deletions
|
@ -1,3 +1,5 @@
|
|||
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
@ -6,22 +8,7 @@ metadata:
|
|||
app: waiverdb
|
||||
data:
|
||||
settings.py: |-
|
||||
{% if env == 'staging' %}
|
||||
DATABASE_URI = 'postgresql+psycopg2://waiverdb@db01.stg.phx2.fedoraproject.org:5432/waiverdb'
|
||||
RESULTSDB_API_URL = 'https://taskotron.stg.fedoraproject.org/resultsdb_api/api/v2.0'
|
||||
CORS_URL = 'https://bodhi.stg.fedoraproject.org'
|
||||
MESSAGE_BUS_PUBLISH = True
|
||||
{% else %}
|
||||
DATABASE_URI = 'postgresql+psycopg2://waiverdb@db01.phx2.fedoraproject.org:5432/waiverdb'
|
||||
RESULTSDB_API_URL = 'https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0'
|
||||
CORS_URL = 'https://bodhi.fedoraproject.org'
|
||||
MESSAGE_BUS_PUBLISH = False
|
||||
{% endif %}
|
||||
AUTH_METHOD = 'OIDC'
|
||||
OIDC_REQUIRED_SCOPE = 'https://waiverdb.fedoraproject.org/oidc/create-waiver'
|
||||
OIDC_CLIENT_SECRETS = '/etc/secret/client_secrets.json'
|
||||
SUPERUSERS = ['bodhi@service']
|
||||
PORT = 8080
|
||||
{{ load_file('settings.py') | indent }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
|
@ -29,7 +16,6 @@ metadata:
|
|||
name: fedora-messaging-configmap
|
||||
labels:
|
||||
app: waiverdb
|
||||
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
||||
data:
|
||||
config.toml: |-
|
||||
{{ load_file('config.toml') | indent }}
|
||||
|
|
16
roles/openshift-apps/waiverdb/templates/settings.py
Normal file
16
roles/openshift-apps/waiverdb/templates/settings.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% if env == 'staging' %}
|
||||
DATABASE_URI = 'postgresql+psycopg2://waiverdb@db01.stg.phx2.fedoraproject.org:5432/waiverdb'
|
||||
RESULTSDB_API_URL = 'https://taskotron.stg.fedoraproject.org/resultsdb_api/api/v2.0'
|
||||
CORS_URL = 'https://bodhi.stg.fedoraproject.org'
|
||||
MESSAGE_BUS_PUBLISH = True
|
||||
{% else %}
|
||||
DATABASE_URI = 'postgresql+psycopg2://waiverdb@db01.phx2.fedoraproject.org:5432/waiverdb'
|
||||
RESULTSDB_API_URL = 'https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0'
|
||||
CORS_URL = 'https://bodhi.fedoraproject.org'
|
||||
MESSAGE_BUS_PUBLISH = False
|
||||
{% endif %}
|
||||
AUTH_METHOD = 'OIDC'
|
||||
OIDC_REQUIRED_SCOPE = 'https://waiverdb.fedoraproject.org/oidc/create-waiver'
|
||||
OIDC_CLIENT_SECRETS = '/etc/secret/client_secrets.json'
|
||||
SUPERUSERS = ['bodhi@service']
|
||||
PORT = 8080
|
Loading…
Add table
Add a link
Reference in a new issue