feat: waitress port from services option

This commit is contained in:
2023-01-15 18:20:10 +01:00
parent 25441ea4b2
commit a684479e05
3 changed files with 22 additions and 9 deletions

View File

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