Skip to content
Snippets Groups Projects
Commit 259ea190 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

move lehrpreis to new uwsgi role

parent 71aaaac5
No related branches found
No related tags found
1 merge request!3Unify uwsgi python
......@@ -10,3 +10,6 @@
- name: restart uwsgi instance shorturl
service: name="uwsgi@shorturl" state=restarted
- name: restart uwsgi instance lehrpreis
service: name="uwsgi@lehrpreis" state=restarted
- name: ensure we have our branded logo
copy:
src: "{{ lehrpreis_branding_logo_src }}"
dest: "{{ app_path }}/static/images/{{ lehrpreis_branding_logo }}"
owner: "{{ app_user }}"
group: "{{ app_group }}"
mode: 0644
notify:
- restart uwsgi instance {{ app.instance }}
when: lehrpreis_branding_logo and lehrpreis_branding_logo_src
- name: ensure the translations are compiled
command: "{ {app_venv }}/bin/pybabel compile -d translations"
args:
chdir: "{{ app_path }}"
when: git.changed
notify:
- restart uwsgi instance {{ app.instance }}
from secret_config import secret_key as SECRET_KEY
SQLALCHEMY_DATABASE_URI = 'postgresql://{{ app_user }}:@/{{ app_db_name }}'
DEBUG = False
PORT = 5001
SESSION_COOKIE_SECURE = True
import datetime
REMEMBER_COOKIE_NAME = 'remember_token'
REMEMBER_COOKIE_DURATION = datetime.timedelta(30)
REMEMBER_COOKIE_DOMAIN = None
REMEMBER_COOKIE_PATH = '/'
REMEMBER_COOKIE_SECURE = True
REMEMBER_COOKIE_HTTPONLY = True
BABEL_DEFAULT_LOCALE = '{{ lehrpreis_default_locale }}'
BABEL_DEFAULT_TIMEZONE = '{{ lehrpreis_default_timezone }}'
USER_GROUP = '{{ lehrpreis_auth_group }}'
AD_HOST = '{{ lehrpreis_ad_host }}'
AD_DOMAIN = '{{ lehrpreis_ad_domain }}'
AD_USER_DN = '{{ lehrpreis_ad_user_dn }}'
AD_GROUP_DN = '{{ lehrpreis_ad_group_dn }}'
AD_CA_CERT = '{{ lehrpreis_ad_cert }}'
BRANDING_APP_NAME = {'de': '{{ lehrpreis_branding_app_name_de }}',
'en': '{{ lehrpreis_branding_app_name_en }}'}
BRANDING_APP_URL = '{{ lehrpreis_branding_app_url }}'
BRANDING_ORG_NAME = '{{ lehrpreis_branding_org_name }}'
BRANDING_CONTACT = '{{ lehrpreis_branding_contact }}'
BRANDING_LOGO = '{{ lehrpreis_branding_logo }}'
BRANDING_INFORMATION = {'de': '''{{ lehrpreis_branding_information_de }}''',
'en': '''{{ lehrpreis_branding_information_en }}'''}
MAIL_ENABLED = {{ lehrpreis_mail_enabled }}
MAIL_ADDRESS = '{{ lehrpreis_mail_address }}'
MAIL_HOST = '{{ lehrpreis_mail_host }}'
MAIL_LOCALE = '{{ lehrpreis_mail_locale }}'
app_name: lehrpreis
app_user: lehrpreis
app_group: lehrpreis
app_home: /var/www/lehrpreis
app_path: /var/www/lehrpreis
app_python_version: 3
app_venv: /var/www/lehrpreis/venv/
app_program: lehrpreis.py
app_callable: app
app_command: ""
app_mountpoint: /
app_db_name: lehrpreis
app_db_type: postgres
app_additional_software: []
app_deploy_key: "{{ inventory_dir }}/files/deploy-keys/lehrpreis"
app_git_url: "git@git.fsmpi.rwth-aachen.de:studi-systeme/lehrpreis.git"
app_git_version: HEAD
app_config_file: config.py
app_secret_config: true
lehrpreis_default_locale: en
lehrpreis_default_timezone: Europe/Berlin
lehrpreis_auth_group: users
lehrpreis_ad_host: ad.example.com
lehrpreis_ad_domain: EXAMPLE
lehrpreis_ad_user_dn: 'cn=users,dc=example,dc=com'
lehrpreis_ad_group_dn: 'cn=users,dc=example,dc=com'
lehrpreis_ad_cert: ''
lehrpreis_branding_app_name_de: 'Lehrpreis WebApp'
lehrpreis_branding_app_name_en: 'Teaching Award WebApp'
lehrpreis_branding_app_url: 'https://example.com'
lehrpreis_branding_org_name: 'Example Org'
lehrpreis_branding_contact: 'committee@example.com'
lehrpreis_branding_logo: ''
lehrpreis_branding_logo_src: ''
lehrpreis_branding_information_de: ''
lehrpreis_branding_information_en: ''
lehrpreis_mail_enabled: True
lehrpreis_mail_address: 'committee@example.com'
lehrpreis_mail_host: mail.example.com
lehrpreis_mail_locale: en
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment