From df94a67fd24a43f5ddd12507e258880d8f6a76a7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 9 Apr 2024 14:52:42 +0200 Subject: [PATCH] Move some configuration options. --- templates/shinyproxy-conf.yml.j2 | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/templates/shinyproxy-conf.yml.j2 b/templates/shinyproxy-conf.yml.j2 index 471baa2..8fd14d6 100644 --- a/templates/shinyproxy-conf.yml.j2 +++ b/templates/shinyproxy-conf.yml.j2 @@ -14,8 +14,6 @@ server: proxy: {% if shinyproxy_container_backend == 'docker-swarm' %} bind-address: 0.0.0.0 - docker: - internal-networking: true {% else %} bind-address: {{ shinyproxy_bind_address }} {% endif %} @@ -45,6 +43,24 @@ proxy: {% endif %} admin-groups: {{ shinyproxy_admin_group }} container-backend: {{ shinyproxy_container_backend }} +{% if shinyproxy_container_backend == 'docker' or shinyproxy_container_backend == 'docker-swarm' %} + docker: + container-memory-request: {{ shinyproxy_docker_memory_request }} + container-memory-limit: {{ shinyproxy_docker_memory_limit }} + container-cpu-limit: {{ shinyproxy_docker_cpu_limit }} +{% if not shinyproxy_as_docker_service %} + cert-path: {{ shinyproxy_docker_certs_dir }} + url: {{ shinyproxy_docker_url }} + container-protocol: {{ shinyproxy_docker_protocol }} + privileged: {{ shinyproxy_docker_privileged }} + port-range-start: {{ shinyproxy_docker_port_range_start }} + internal-networking: {{ shinyproxy_docker_internal_networking }} +{% else %} + privileged: {{ shinyproxy_docker_privileged }} + internal-networking: true +{% endif %} +{% endif %} + {% if shinyproxy_authentication == 'ldap' %} # LDAP configuration ldap: @@ -89,22 +105,6 @@ proxy: {% endif %} -{% if shinyproxy_container_backend == 'docker' or shinyproxy_container_backend == 'docker-swarm' %} - docker: - container-memory-request: {{ shinyproxy_docker_memory_request }} - container-memory-limit: {{ shinyproxy_docker_memory_limit }} - container-cpu-limit: {{ shinyproxy_docker_cpu_limit }} -{% if not shinyproxy_as_docker_service %} - cert-path: {{ shinyproxy_docker_certs_dir }} - url: {{ shinyproxy_docker_url }} - container-protocol: {{ shinyproxy_docker_protocol }} - privileged: {{ shinyproxy_docker_privileged }} - port-range-start: {{ shinyproxy_docker_port_range_start }} - internal-networking: {{ shinyproxy_docker_internal_networking }} -{% else %} - internal-networking: true -{% endif %} -{% endif %} specs: {% if shinyproxy_default_apps %} - id: 01_hello