Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
ansible-shared
webservices
Commits
29a46f89
Commit
29a46f89
authored
Aug 13, 2021
by
Robin Sonnabend
Browse files
Add uwsgi-python app schrank-flask
parent
7fa10310
Changes
3
Hide whitespace changes
Inline
Side-by-side
uwsgi-python/tasks/apps/schrank-flask.yml
0 → 100644
View file @
29a46f89
---
# 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
uwsgi-python/templates/apps/schrank-flask.j2
0 → 100644
View file @
29a46f89
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}}"
uwsgi-python/vars/schrank-flask.yml
0 → 100644
View file @
29a46f89
---
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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment