Skip to content
Snippets Groups Projects
Commit 3e5ad4b5 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

uwsgi-python: Add schilder2000

parent 15f1a591
Branches
No related tags found
1 merge request!51uwsgi-python: Add schilder2000
Pipeline #6404 failed
......@@ -133,3 +133,6 @@
- name: restart uwsgi instance etherpad-api-proxy
service: name="uwsgi@etherpad-api-proxy" state=restarted
- name: restart uwsgi instance schilder2000
service: name="uwsgi@schilder2000" state=restarted
---
- name: Create instance directory
file:
path: "{{ app_venv }}/var/schilder2000-instance"
state: directory
owner: root
group: "{{ app_group }}"
mode: "0751"
tags:
- uwsgi-app
- "{{ app.app }}"
- "{{ app.instance }}"
- name: Generate secret config
template:
src: secret_config.py.j2
dest: "{{ app_venv }}/var/schilder2000-instance/secret_config.py"
owner: root
group: "{{ app_group }}"
mode: "0640"
force: false
notify:
- restart uwsgi instance {{ app.instance }}
- name: Install app config
template:
src: apps/{{ app.app }}.j2
dest: "{{ app_venv }}/var/schilder2000-instance/config.py"
owner: root
group: "{{ app_group }}"
mode: "0640"
notify:
- restart uwsgi instance {{ app.instance }}
- name: Migrate database
command: "{{ app_venv }}/bin/flask alembic upgrade head"
environment:
FLASK_APP: schilder2000
become: true
become_user: "{{ app_user }}"
notify:
- restart uwsgi instance {{ app.instance }}
import json
from pathlib import Path
exec((Path(__file__).parent / "secret_config.py").read_text())
SECRET_KEY = secret_key
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg:///schilder2000"
TEMPLATES_AUTO_RELOAD = True
PRINTERS = json.loads(r"""
{{ schilder2000_printers | to_json }}
""")
REQUIRE_LOGIN = {{ schilder2000_require_login | bool | title }}
{{ schilder2000_extra }}
---
app_module: "schilder2000:create_app()"
app_db_name: schilder2000
app_db_type: postgres
#app_additional_software:
# - libldap-dev # for auth-ldap
# - default-libmysqlclient-dev # for db-mysql
app_pip_package: schilder2000
app_pip_index_url: >-
https://git.fsmpi.rwth-aachen.de/api/v4/projects/305/packages/pypi/simple
app_pip_extras:
- db-postgres
app_config_file: ""
app_secret_config: false
schilder2000_require_login: false
schilder2000_printers: {}
schilder2000_extra: ""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment