Tentatively add the haproxy network into the portainer compose file

This commit is contained in:
Andrea Dell'Amico 2020-10-26 17:59:30 +01:00
parent de37d896b4
commit 85996c7adf
2 changed files with 11 additions and 8 deletions

View File

@ -15,9 +15,8 @@
- /srv/portainer/portainer-agent-stack.yml
run_once: True
- name: Connect the portainer service to the haproxy-public network
shell: docker service update --network-add haproxy-public portainer_portainer --update-delay 30s --update-parallelism 1
ignore_errors: True
# - name: Connect the portainer service to the haproxy-public network
# shell: docker service update --network-add haproxy-public portainer_portainer --update-delay 30s --update-parallelism 1 || true
when: docker_swarm_manager_main_node | bool
tags: [ 'portainer', 'docker_portainer', 'docker_swarm', 'docker' ]

View File

@ -1,5 +1,13 @@
version: '3.2'
volumes:
portainer_data:
networks:
{{ haproxy_docker_overlay_network }}:
external: true
{{ docker_swarm_portainer_network }}:
services:
agent:
image: portainer/agent
@ -27,6 +35,7 @@ services:
- portainer_data:/data
networks:
- {{ docker_swarm_portainer_network }}
- {{ haproxy_docker_overlay_network }}
deploy:
mode: replicated
replicas: 1
@ -47,8 +56,3 @@ services:
driver: 'journald'
{% endif %}
volumes:
portainer_data:
networks:
{{ docker_swarm_portainer_network }}: