Badges: the flask rewrite is now deployed to prod
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
89fcafb838
commit
6bbe0b70c3
5 changed files with 0 additions and 173 deletions
|
@ -17,10 +17,6 @@ items:
|
||||||
{{ load_file('fm-fedbadges.toml') | indent(6) }}
|
{{ load_file('fm-fedbadges.toml') | indent(6) }}
|
||||||
checkout-rules-repo.sh: |-
|
checkout-rules-repo.sh: |-
|
||||||
{{ load_file('checkout-rules-repo.sh') | indent(6) }}
|
{{ load_file('checkout-rules-repo.sh') | indent(6) }}
|
||||||
tahrir.ini: |-
|
|
||||||
{{ load_file('tahrir.ini') | indent(6) }}
|
|
||||||
secrets.ini: |-
|
|
||||||
{{ load_file('secrets.ini') | indent(6) }}
|
|
||||||
tahrir.cfg: |-
|
tahrir.cfg: |-
|
||||||
{{ load_file('tahrir.cfg.py') | indent(6) }}
|
{{ load_file('tahrir.cfg.py') | indent(6) }}
|
||||||
gunicorn.conf.py: |-
|
gunicorn.conf.py: |-
|
||||||
|
|
|
@ -73,7 +73,6 @@ spec:
|
||||||
- name: FEDORA_MESSAGING_CONF
|
- name: FEDORA_MESSAGING_CONF
|
||||||
value: /etc/badges/fm-tahrir.toml
|
value: /etc/badges/fm-tahrir.toml
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
|
@ -88,7 +87,6 @@ spec:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: "/healthz/live"
|
path: "/healthz/live"
|
||||||
port: 8080
|
port: 8080
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: etc-badges
|
- name: etc-badges
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[tahrir]
|
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
session.secret="{{tahrirstgSessionSecret}}"
|
|
||||||
authnsecret="{{tahrirstgAuthnSecret}}"
|
|
||||||
{% else %}
|
|
||||||
session.secret="{{tahrirSessionSecret}}"
|
|
||||||
authnsecret="{{tahrirAuthnSecret}}"
|
|
||||||
{% endif %}
|
|
|
@ -1,150 +0,0 @@
|
||||||
[pipeline:main]
|
|
||||||
pipeline =
|
|
||||||
pyramid
|
|
||||||
|
|
||||||
[filter:proxy-prefix]
|
|
||||||
use = egg:PasteDeploy#prefix
|
|
||||||
prefix = /
|
|
||||||
scheme = https
|
|
||||||
|
|
||||||
[app:pyramid]
|
|
||||||
use = egg:tahrir
|
|
||||||
filter-with = proxy-prefix
|
|
||||||
|
|
||||||
#pyramid.reload_templates = true
|
|
||||||
pyramid.default_locale_name = en
|
|
||||||
pyramid.includes =
|
|
||||||
pyramid_tm
|
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirstgDBPassword}}@db01.stg.iad2.fedoraproject.org/tahrir
|
|
||||||
{% else %}
|
|
||||||
sqlalchemy.url = postgresql://{{tahrirDBUser}}:{{tahrirDBPassword}}@db-tahrir/tahrir
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
mako.directories=tahrir:templates
|
|
||||||
|
|
||||||
tahrir.admin = nb@{{env_prefix}}fedoraproject.org, siddharthvipul1@{{env_prefix}}fedoraproject.org, sayanchowdhury@{{env_prefix}}fedoraproject.org, kevin@{{env_prefix}}fedoraproject.org, jflory7@{{env_prefix}}fedoraproject.org, codeblock@{{env_prefix}}fedoraproject.org, churchyard@{{env_prefix}}fedoraproject.org, misc@{{env_prefix}}fedoraproject.org, computerkid@{{env_prefix}}fedoraproject.org, dustymabe@{{env_prefix}}fedoraproject.org, gui1ty@{{env_prefix}}fedoraproject.org, riecatnor@{{env_prefix}}fedoraproject.org, smeragoel@{{env_prefix}}fedoraproject.org, sumantrom@{{env_prefix}}fedoraproject.org, ekidney@{{env_prefix}}fedoraproject.org, t0xic0der@{{env_prefix}}fedoraproject.org, ryanlerch@{{env_prefix}}fedoraproject.org, abompard@{{env_prefix}}fedoraproject.org
|
|
||||||
|
|
||||||
tahrir.pngs.uri = /var/lib/badges/pngs
|
|
||||||
# disabled, trying to see if this fix this bug
|
|
||||||
# https://pagure.io/fedora-infrastructure/issue/8689
|
|
||||||
dogpile.cache.backend = dogpile.cache.null
|
|
||||||
dogpile.cache.expiration_time = 100
|
|
||||||
dogpile.cache.arguments.url = memcached01:11211
|
|
||||||
dogpile.cache.arguments.distributed_lock = True
|
|
||||||
dogpile.cache.arguments.lock_timeout = 5
|
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
tahrir.title = Fedora Badges (staging!)
|
|
||||||
tahrir.base_url = https://badges.apps.ocp.stg.fedoraproject.org/
|
|
||||||
tahrir.openid_identifier = http://id.stg.fedoraproject.org/
|
|
||||||
tahrir.trusted_openid = ^http(s)?:\/\/([a-zA-Z0-9-]+\.)?id\.stg\.fedoraproject\.org\/?$
|
|
||||||
tahrir.openid_realm = https://badges.stg.fedoraproject.org
|
|
||||||
tahrir.websocket.topic = org.fedoraproject.stg.fedbadges.badge.award
|
|
||||||
#fedmenu.url = https://apps.stg.fedoraproject.org/fedmenu
|
|
||||||
#fedmenu.data_url = https://apps.stg.fedoraproject.org/js/data.js
|
|
||||||
{% else %}
|
|
||||||
tahrir.title = Fedora Badges
|
|
||||||
tahrir.base_url = https://badges.fedoraproject.org
|
|
||||||
tahrir.openid_identifier = http://id.fedoraproject.org/
|
|
||||||
tahrir.trusted_openid = ^http(s)?:\/\/([a-zA-Z0-9-]+\.)?id\.fedoraproject\.org(/)?$
|
|
||||||
tahrir.openid_realm = https://badges.fedoraproject.org
|
|
||||||
tahrir.websocket.topic = org.fedoraproject.prod.fedbadges.badge.award
|
|
||||||
#fedmenu.url = https://apps.fedoraproject.org/fedmenu
|
|
||||||
#fedmenu.data_url = https://apps.fedoraproject.org/js/data.js
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
tahrir.secret_config_path = /etc/badges/secrets.ini
|
|
||||||
|
|
||||||
tahrir.secure_cookies = True
|
|
||||||
tahrir.httponly_cookies = True
|
|
||||||
tahrir.allow_changenick = False
|
|
||||||
|
|
||||||
# Only allow @fedoraproject.org emails
|
|
||||||
tahrir.use_openid_email = False
|
|
||||||
tahrir.email_domain = @{{env_prefix}}fedoraproject.org
|
|
||||||
|
|
||||||
# For auto-updating the frontpage.
|
|
||||||
tahrir.use_websockets = False
|
|
||||||
|
|
||||||
# For emitting messages when users claim badge invitations.
|
|
||||||
tahrir.use_fedmsg = True
|
|
||||||
|
|
||||||
tahrir.default_issuer = fedora-project
|
|
||||||
tahrir.sitedocs_dir = /opt/app-root/src/fedora-sitedocs
|
|
||||||
|
|
||||||
tahrir.display_tags = content,development,community,quality,event,miscellaneous
|
|
||||||
|
|
||||||
tahrir.social.twitter = True
|
|
||||||
tahrir.social.twitter_user_text = Check out all these #fedorabadges :trophy:
|
|
||||||
tahrir.social.twitter_user_hash = #fedora
|
|
||||||
tahrir.social.gplus = True
|
|
||||||
|
|
||||||
moksha.domain = fedoraproject.org
|
|
||||||
|
|
||||||
moksha.notifications = False
|
|
||||||
moksha.socket.notify = False
|
|
||||||
|
|
||||||
moksha.livesocket = True
|
|
||||||
moksha.livesocket.backend = websocket
|
|
||||||
moksha.livesocket.reconnect_interval = 5000
|
|
||||||
moksha.livesocket.websocket.scheme = wss
|
|
||||||
moksha.livesocket.websocket.port = 9939
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
moksha.livesocket.websocket.host = stg.fedoraproject.org
|
|
||||||
{% else %}
|
|
||||||
moksha.livesocket.websocket.host = hub.fedoraproject.org
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if env == 'staging' %}
|
|
||||||
oidc.fedora.client_id = tahrir
|
|
||||||
oidc.fedora.client_secret = {{ tahrir_oidc_client_secret_staging}}
|
|
||||||
oidc.fedora.server_metadata_url = https://id.stg.fedoraproject.org/openidc/.well-known/openid-configuration
|
|
||||||
{% else %}
|
|
||||||
oidc.fedora.client_id = tahrir
|
|
||||||
oidc.fedora.client_secret = {{ tahrir_oidc_client_secret }}
|
|
||||||
oidc.fedora.server_metadata_url = https://id.fedoraproject.org/openidc/.well-known/openid-configuration
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Begin logging configuration
|
|
||||||
|
|
||||||
[loggers]
|
|
||||||
keys = root, tahrir, sqlalchemy
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = console
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = generic
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = INFO
|
|
||||||
handlers = console
|
|
||||||
|
|
||||||
[logger_tahrir]
|
|
||||||
level = DEBUG
|
|
||||||
handlers =
|
|
||||||
qualname = tahrir
|
|
||||||
|
|
||||||
[logger_sqlalchemy]
|
|
||||||
level = WARN
|
|
||||||
handlers =
|
|
||||||
qualname = sqlalchemy.engine
|
|
||||||
# "level = INFO" logs SQL queries.
|
|
||||||
# "level = DEBUG" logs SQL queries and results.
|
|
||||||
# "level = WARN" logs neither. (Recommended for production systems.)
|
|
||||||
|
|
||||||
[handler_console]
|
|
||||||
class = StreamHandler
|
|
||||||
args = (sys.stderr,)
|
|
||||||
level = NOTSET
|
|
||||||
formatter = generic
|
|
||||||
|
|
||||||
[formatter_generic]
|
|
||||||
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
|
|
||||||
|
|
||||||
# End logging configuration
|
|
|
@ -1,12 +1,4 @@
|
||||||
{% if env == "staging" %}
|
|
||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
from tahrir.app import create_app
|
from tahrir.app import create_app
|
||||||
application = create_app()
|
application = create_app()
|
||||||
application.wsgi_app = ProxyFix(application.wsgi_app, x_proto=1, x_host=1)
|
application.wsgi_app = ProxyFix(application.wsgi_app, x_proto=1, x_host=1)
|
||||||
{% else %}
|
|
||||||
from pyramid.paster import get_app, setup_logging
|
|
||||||
ini_path = '/etc/badges/tahrir.ini'
|
|
||||||
setup_logging(ini_path)
|
|
||||||
|
|
||||||
application = get_app(ini_path, 'main')
|
|
||||||
{% endif %}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue