More haproxy config options.
This commit is contained in:
parent
2ccf6a6978
commit
4b05619e7f
|
@ -10,9 +10,11 @@ docker_swarm_haproxy_plain_http_api: True
|
|||
docker_swarm_expose_api_via_haproxy: True
|
||||
docker_swarm_expose_api_hostname: 'swarm.example.com'
|
||||
docker_swarm_api_backend: 'dockersocket /var/run/docker.sock'
|
||||
docker_swarm_api_check_availability: True
|
||||
docker_swarm_api_accept_proxy: False
|
||||
docker_swarm_api_check_availability: False
|
||||
docker_swarm_api_networks_acl:
|
||||
- '127.0.0.1/8'
|
||||
docker_swarm_api_haproxy_mode: http
|
||||
# Portainer
|
||||
docker_swarm_cluster_portainer_install: True
|
||||
docker_swarm_portainer_hostname: 'portainer-swarm.example.com'
|
||||
|
|
|
@ -115,12 +115,12 @@ frontend http
|
|||
{% if docker_swarm_expose_api_via_haproxy %}
|
||||
frontend docker_ft
|
||||
{% if docker_swarm_haproxy_plain_http_api %}
|
||||
bind :{{ docker_swarm_haproxy_swarm_port }} {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
||||
bind :{{ docker_swarm_haproxy_swarm_port }} {% if docker_swarm_haproxy_installation_type == 'global' and docker_swarm_api_accept_proxy %}accept-proxy{% endif %}
|
||||
{% else %}
|
||||
bind :{{ docker_swarm_haproxy_swarm_port }} ssl crt {{ haproxy_cert_dir }} alpn h2,http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
||||
bind :{{ docker_swarm_haproxy_swarm_port }} ssl crt {{ haproxy_cert_dir }} alpn h2,http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' and docker_swarm_api_accept_proxy %}accept-proxy{% endif %}
|
||||
{% endif %}
|
||||
|
||||
mode http
|
||||
mode {{ docker_swarm_api_haproxy_mode }}
|
||||
acl swarm_api hdr_dom(host) -i {{ docker_swarm_expose_api_hostname }}
|
||||
|
||||
acl swarm_api_allowed_nets src {% for net in docker_swarm_api_networks_acl %} {{ net }}{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue