Files
fedora-infra_ansible/roles/taskotron/resultsdb-backend/templates/settings.py.j2

21 lines
1.2 KiB
Django/Jinja

{%- if deployment_type == 'prod' %}
SECRET_KEY = '{{ prod_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ prod_resultsdb_db_user }}:{{ prod_resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
{%- if deployment_type == 'stg' %}
SECRET_KEY = '{{ stg_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ stg_resultsdb_db_user }}:{{ stg_resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
{%- if deployment_type == 'dev' %}
SECRET_KEY = '{{ dev_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ dev_resultsdb_db_user }}:{{ dev_resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
{%- if deployment_type == 'local' %}
SECRET_KEY = '{{ local_resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ local_resultsdb_db_user }}:{{ local_resultsdb_db_password }}@127.0.0.1:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
{% endif %}
FILE_LOGGING = False
LOGFILR = '/var/log/resultsdb/resultsdb.log'
SYSLOG_LOGGING = False
STREAM_LOGGING = True