add support for generic streams

This commit is contained in:
nd 2021-09-04 22:44:41 +02:00
parent 4d82b39ef9
commit 41841311e6
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
4 changed files with 48 additions and 0 deletions

22
templates/stream.conf.j2 Normal file
View file

@ -0,0 +1,22 @@
#jinja2:lstrip_blocks: True
{% set stream = {}|combine(nginx_streams_defaults, item.value, recursive=True) %}
{% set stream_name = item.key %}
server {
{% for i in stream.listen.custom %}
listen {{ i }};
{% endfor %}
proxy_pass {{ stream.proxy_pass }};
proxy_protocol {{ stream.proxy_protocol }};
{% for c in stream.custom|default([]) %}
{{ c }};
{% endfor %}
{% for include in stream.includes %}
include {{ include }};
{% endfor %}
}