From 52b516579ae440de95494231f1f264818144152d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 9 Apr 2024 14:30:14 +0200 Subject: [PATCH] Add a networking option when the backend is docker swarm. --- templates/shinyproxy-conf.yml.j2 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/shinyproxy-conf.yml.j2 b/templates/shinyproxy-conf.yml.j2 index 1374e70..471baa2 100644 --- a/templates/shinyproxy-conf.yml.j2 +++ b/templates/shinyproxy-conf.yml.j2 @@ -12,6 +12,15 @@ server: frame-options: {{ shinyproxy_server_frame_options }} proxy: +{% if shinyproxy_container_backend == 'docker-swarm' %} + bind-address: 0.0.0.0 + docker: + internal-networking: true +{% else %} + bind-address: {{ shinyproxy_bind_address }} +{% endif %} + port: {{ shinyproxy_http_port }} + hide-navbar: {{ shinyproxy_hide_navbar }} title: {{ shinyproxy_app_title }} logo-url: {{ shinyproxy_logo_url }} landing-page: {{ shinyproxy_landing_page }} @@ -27,13 +36,6 @@ proxy: default-proxy-max-lifetime: {{ shinyproxy_default_proxy_max_lifetime }} same-site-cookie: {{ shinyproxy_same_site_cookie }} {% endif %} -{% if shinyproxy_container_backend == 'docker-swarm' %} - bind-address: 0.0.0.0 -{% else %} - bind-address: {{ shinyproxy_bind_address }} -{% endif %} - port: {{ shinyproxy_http_port }} - hide-navbar: {{ shinyproxy_hide_navbar }} {% if shinyproxy_custom_template %} template-path: {{ shinyproxy_template_path }} {% endif %}