1
0
Fork 0

support multi containers

This commit is contained in:
zhipeng 2022-03-25 18:23:05 +08:00
parent 21069ec18b
commit d41364f1af
6 changed files with 58 additions and 13 deletions

View file

@ -62,6 +62,8 @@ backend srv_{{ host }}
option tcp-check
tcp-check connect{{ " ssl" if o["health-check"] == "ssl" }}
{% endif %}
server srv {{ o["hosts"][k] }} check weight 1{{ " verify none" if o["health-check"] == "ssl" }}
{% for c in o["hosts"][k] %}
server srv-{{ loop.index0 }} {{ c }} check weight 1{{ " verify none" if o["health-check"] == "ssl" }}
{% endfor %}
{% endfor %}
{% endfor %}