Files
no-secrets-athq-ansible/templates/waitress-systemd-unit.j2
2023-01-15 18:33:56 +01:00

25 lines
485 B
Django/Jinja

{% if item.get("port") %}
{% set port = item.port %}
{% else %}
{% set port = services[item.name].port %}
{% endif %}
{% if item.get("external_oidc") %}
{% set port = port + 1000 %}
{% endif %}
[Unit]
Description={{ item.name }} on {{ port }} at {{ item.path }}
After=network.target
[Service]
WorkingDirectory={{ item.path }}
Type=simple
User=www-data
ExecStart=/usr/bin/waitress-serve --host 0.0.0.0 --port {{ port }} --call 'app:createApp'
[Install]
WantedBy=multi-user.target