27 lines
545 B
Django/Jinja
27 lines
545 B
Django/Jinja
defaults
|
|
log global
|
|
mode tcp
|
|
timeout connect 10s
|
|
timeout client 36h
|
|
timeout server 36h
|
|
balance leastconn
|
|
|
|
{% if groups["gitea"] | length > 0 %}
|
|
listen gitea_ssh
|
|
bind *:2499
|
|
option tcp-check
|
|
tcp-check expect rstring SSH-2.0-OpenSSH.*
|
|
{% for host in groups["gitea"] %}
|
|
server {{ host }} {{ host }}:2498
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
|
|
{% if groups["syncthing"] | length > 0 and "syncthing" not in group_names %}
|
|
listen syncthing
|
|
bind *:22000
|
|
{% for host in groups["syncthing"] %}
|
|
server {{ host }} {{ host }}:22000
|
|
{% endfor %}
|
|
{% endif %}
|