Do not connect to any network while deploying.
This commit is contained in:
parent
9070d75ea1
commit
8a3a8c322d
|
@ -11,6 +11,8 @@ haproxy_docker_container: False
|
||||||
haproxy_docker_version: '{{ haproxy_version }}.4'
|
haproxy_docker_version: '{{ haproxy_version }}.4'
|
||||||
haproxy_docker_image: 'haproxytech/haproxy-debian:{{ haproxy_version }}.4'
|
haproxy_docker_image: 'haproxytech/haproxy-debian:{{ haproxy_version }}.4'
|
||||||
haproxy_docker_compose_dir: /srv/haproxy_swarm
|
haproxy_docker_compose_dir: /srv/haproxy_swarm
|
||||||
|
haproxy_docker_restart_policy: 'on-failure'
|
||||||
|
|
||||||
haproxy_ha_with_keepalived: False
|
haproxy_ha_with_keepalived: False
|
||||||
haproxy_docker_swarm_networks:
|
haproxy_docker_swarm_networks:
|
||||||
- 'portainer_{{ docker_swarm_portainer_network }}'
|
- 'portainer_{{ docker_swarm_portainer_network }}'
|
||||||
|
|
|
@ -32,13 +32,6 @@ services:
|
||||||
mode: host
|
mode: host
|
||||||
{% endif %}
|
{% endif %}
|
||||||
dns: [127.0.0.11]
|
dns: [127.0.0.11]
|
||||||
networks:
|
|
||||||
{% for net in haproxy_docker_swarm_networks %}
|
|
||||||
- {{ net }}
|
|
||||||
{% endfor %}
|
|
||||||
{% for othernet in haproxy_docker_swarm_additional_networks %}
|
|
||||||
- {{ othernet }}
|
|
||||||
{% endfor %}
|
|
||||||
deploy:
|
deploy:
|
||||||
{% if docker_swarm_haproxy_installation_type == 'keepalive' or docker_swarm_haproxy_installation_type == 'mesh' %}
|
{% if docker_swarm_haproxy_installation_type == 'keepalive' or docker_swarm_haproxy_installation_type == 'mesh' %}
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
@ -46,6 +39,9 @@ services:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if docker_swarm_haproxy_installation_type == 'global' %}
|
{% if docker_swarm_haproxy_installation_type == 'global' %}
|
||||||
mode: global
|
mode: global
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
delay: 20s
|
||||||
{% endif %}
|
{% endif %}
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
|
@ -53,7 +49,7 @@ services:
|
||||||
- {{ constr }}
|
- {{ constr }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: {{ haproxy_docker_restart_policy}}
|
||||||
delay: 20s
|
delay: 20s
|
||||||
max_attempts: 5
|
max_attempts: 5
|
||||||
window: 120s
|
window: 120s
|
||||||
|
|
Loading…
Reference in New Issue