From 372a0dfa5154b16ceceb93dc6a27d74d4dac98d1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 26 May 2023 18:02:48 +0200 Subject: [PATCH] Change the way the portainer ports are exposed. --- templates/portainer-agent-stack.yml.j2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/templates/portainer-agent-stack.yml.j2 b/templates/portainer-agent-stack.yml.j2 index 07fae5f..fd762ab 100644 --- a/templates/portainer-agent-stack.yml.j2 +++ b/templates/portainer-agent-stack.yml.j2 @@ -43,9 +43,18 @@ services: {% if docker_swarm_cluster_haproxy_install %} ports: - - "9443:9443" - - "9000:9000" - - "8000:8000" + - target: 9443 + published: 9443 + protocol: tcp + mode: 'ingress' + - target: 9000 + published: 9000 + protocol: tcp + mode: 'ingress' + - target: 8000 + published: 8000 + protocol: tcp + mode: 'ingress' {% endif %} volumes: - portainer_server_data:/data