From 47c49348417402d9923612569bb8345d821b0966 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sun, 18 Apr 2021 21:26:36 +0200 Subject: [PATCH] When swarm, force the ports mode to ingress. --- templates/shinyproxy-docker-compose.yml.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/shinyproxy-docker-compose.yml.j2 b/templates/shinyproxy-docker-compose.yml.j2 index 1599fd4..80e1e7b 100644 --- a/templates/shinyproxy-docker-compose.yml.j2 +++ b/templates/shinyproxy-docker-compose.yml.j2 @@ -20,12 +20,12 @@ services: - target: {{ shinyproxy_http_port }} published: {{ shinyproxy_http_port }} protocol: tcp - mode: 'host' + mode: '{{ shinyproxy_docker_http_port_mode }}' {% if shinyproxy_expose_prometheus and shinyproxy_version is version_compare('2.5.0', '>=') %} - target: 9090 published: {{ shinyproxy_prometheus_port }} protocol: tcp - mode: 'host' + mode: '{{ shinyproxy_docker_http_port_mode }}' {% endif %} {% else %} image: {{ shinyproxy_docker_image }} @@ -34,12 +34,12 @@ services: - target: {{ shinyproxy_http_port }} published: {{ shinyproxy_http_port }} protocol: tcp - mode: '{{ shinyproxy_docker_http_port_mode }}' + mode: 'ingress' {% if shinyproxy_expose_prometheus and shinyproxy_version is version_compare('2.5.0', '>=') %} - target: 9090 published: {{ shinyproxy_prometheus_port }} protocol: tcp - mode: 'host' + mode: 'ingress' {% endif %} {% endif %} {% endif %}