Commit 29a46f89 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Add uwsgi-python app schrank-flask

parent 7fa10310
---
# https://github.com/ansible/ansible/issues/42983
- name: ensure there exists a .ansible folder
file:
path: "{{app_path}}/.ansible"
state: directory
owner: "{{app_user}}"
group: "{{app_group}}"
- name: install pdf utils
apt:
name: poppler-utils
state: present
- name: ensure data model upgrades are applied # noqa 301
command: "{{app_venv}}/bin/flask db upgrade"
args:
chdir: "{{app_path}}"
environment:
FLASK_APP: "{{app_program}}"
become: true
become_user: "{{app_user}}"
notify:
- "restart uwsgi instance {{app.instance}}"
- name: ensure there a directory for the documents
file:
path: "{{schrank_document_path}}"
state: directory
owner: "{{app_user}}"
group: "{{schrank_document_group}}"
mode: "{{schrank_document_permissions}}"
notify:
- "restart uwsgi instance {{app.instance}}"
- name: ensure the folder from above is not present anymore
file:
path: "{{app_path}}/.ansible"
state: absent
from secret_config import secret_key as SECRET_KEY
SQLALCHEMY_DATABASE_URI = "postgresql://{{ app_user }}:@/{{ app_db_name }}"
SQLALCHEMY_TRACK_MODIFICATIONS = False
DOCUMENT_PATH = "{{schrank_document_path}}"
SSO_URL = "{{schrank_sso_url}}"
SSO_GROUP = "{{schrank_sso_group}}"
---
app_name: schrank-flask
app_user: schrankweb
app_group: schrankweb
app_program: server.py
app_db_name: schrank
app_db_type: postgres
app_git_url: "git@git.fsmpi.rwth-aachen.de:fachschaft/schrank-web-flask.git"
schrank_document_path: "{{app_path}}/documents"
schrank_document_group: schrank
schrank_document_permissions: "2750"
schrank_sso_url: "https://sso.fsmpi.rwth-aachen.de/"
schrank_sso_group: "fachschaft"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment