pagure / staging: set correct env

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2022-09-19 14:28:17 -07:00
parent bfaf5a59bf
commit 1c1780c931
4 changed files with 13 additions and 5 deletions

View file

@ -14,8 +14,11 @@ script_location = /usr/share/tahrir_api/alembic/
# set to 'true' to run the environment during # set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate # the 'revision' command, regardless of autogenerate
# revision_environment = false # revision_environment = false
{% if env == 'staging' %}
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirstgDBPassword}}@db-tahrir/tahrir
{% else %}
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir
{% endif %}
# Logging configuration # Logging configuration
[loggers] [loggers]

View file

@ -14,7 +14,7 @@ config = {
# This is a sqlalchemy URI that points to the tahrir DB. # This is a sqlalchemy URI that points to the tahrir DB.
{% if env == 'staging' %} {% if env == 'staging' %}
"database_uri": "postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db01.stg.iad2.fedoraproject.org/tahrir", "database_uri": "postgresql://{{tahrirDBUser}}:{{tahrirstgDBPassword}}@db01.stg.iad2.fedoraproject.org/tahrir",
{% else %} {% else %}
"database_uri": "postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir", "database_uri": "postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir",
{% endif %} {% endif %}

View file

@ -28,7 +28,7 @@ pyramid.includes =
pyramid_tm pyramid_tm
{% if env == 'staging' %} {% if env == 'staging' %}
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db01.stg.iad2.fedoraproject.org/tahrir sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirstgDBPassword}}@db01.stg.iad2.fedoraproject.org/tahrir
{% else %} {% else %}
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir
{% endif %} {% endif %}
@ -90,8 +90,13 @@ tahrir.social.twitter_user_hash = #fedora
tahrir.social.gplus = True tahrir.social.gplus = True
{% if env == 'staging' %}
session.secret="{{tahrirstgSessionSecret}}"
authnsecret="{{tahrirstgAuthnSecret}}"
{% else %}
session.secret="{{tahrirSessionSecret}}" session.secret="{{tahrirSessionSecret}}"
authnsecret="{{tahrirAuthnSecret}}" authnsecret="{{tahrirAuthnSecret}}"
{% endif %}
moksha.domain = fedoraproject.org moksha.domain = fedoraproject.org

View file

@ -12,7 +12,7 @@ ADMIN_SESSION_LIFETIME = timedelta(minutes=20)
WTF_CSRF_TIME_LIMIT=None WTF_CSRF_TIME_LIMIT=None
### Secret key for the Flask application ### Secret key for the Flask application
{% if env == 'staging' %} {% if env == 'pagure-staging' %}
SECRET_KEY='{{ pagure_stg_secret_key }}' SECRET_KEY='{{ pagure_stg_secret_key }}'
SALT_EMAIL='{{ pagure_stg_secret_salt_email }}' SALT_EMAIL='{{ pagure_stg_secret_salt_email }}'
{% else %} {% else %}
@ -33,7 +33,7 @@ FAS_OPENID_ENDPOINT = 'https://id.stg.fedoraproject.org/openid/'
### url to the database server: ### url to the database server:
#DB_URL=mysql://user:pass@host/db_name #DB_URL=mysql://user:pass@host/db_name
#DB_URL=postgres://user:pass@host/db_name #DB_URL=postgres://user:pass@host/db_name
{% if env == 'staging' %} {% if env == 'pagure-staging' %}
DB_URL = 'postgresql://{{ pagure_stg_db_user }}:{{ pagure_stg_db_pass }}@{{ pagure_db_host }}/{{ pagure_stg_db_name }}' DB_URL = 'postgresql://{{ pagure_stg_db_user }}:{{ pagure_stg_db_pass }}@{{ pagure_db_host }}/{{ pagure_stg_db_name }}'
{% else %} {% else %}
DB_URL = 'postgresql://{{ pagure_db_user }}:{{ pagure_db_pass }}@{{ pagure_db_host }}/{{ pagure_db_name }}' DB_URL = 'postgresql://{{ pagure_db_user }}:{{ pagure_db_pass }}@{{ pagure_db_host }}/{{ pagure_db_name }}'