From 522da0c14efac81705f42369f697343e321529d9 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sun, 18 Apr 2021 21:18:14 +0200 Subject: [PATCH] Fix the docker compose template. --- templates/shinyproxy-docker-compose.yml.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/shinyproxy-docker-compose.yml.j2 b/templates/shinyproxy-docker-compose.yml.j2 index 0c6bcd7..ee5c603 100644 --- a/templates/shinyproxy-docker-compose.yml.j2 +++ b/templates/shinyproxy-docker-compose.yml.j2 @@ -20,7 +20,7 @@ services: - target: {{ shinyproxy_http_port }} published: :{{ shinyproxy_http_port }} protocol: tcp - mode: '{{ shinyproxy_docker_http_port_mode }}' + mode: 'host' {% if shinyproxy_expose_prometheus and shinyproxy_version is version_compare('2.5.0', '>=') %} - target: 9090 published: {{ shinyproxy_prometheus_port }} @@ -31,9 +31,15 @@ services: image: {{ shinyproxy_docker_image }} {% if not shinyproxy_docker_swarm_behind_haproxy %} ports: - - {{ shinyproxy_http_port }}:{{ shinyproxy_http_port }} + - target: {{ shinyproxy_http_port }} + published: :{{ shinyproxy_http_port }} + protocol: tcp + mode: '{{ shinyproxy_docker_http_port_mode }}' {% if shinyproxy_expose_prometheus and shinyproxy_version is version_compare('2.5.0', '>=') %} - - {{ shinyproxy_prometheus_port }}:{{ shinyproxy_prometheus_port }} + - target: 9090 + published: {{ shinyproxy_prometheus_port }} + protocol: tcp + mode: 'host' {% endif %} {% endif %} {% endif %}