From 595b33d30d2ff89dec49b7c030b8abdd6f18a5bc Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 27 Apr 2022 19:19:01 +0200 Subject: [PATCH] Support more configuration options. --- templates/shinyproxy-2-conf.yml.j2 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/templates/shinyproxy-2-conf.yml.j2 b/templates/shinyproxy-2-conf.yml.j2 index bef08bc..9d2f71d 100644 --- a/templates/shinyproxy-2-conf.yml.j2 +++ b/templates/shinyproxy-2-conf.yml.j2 @@ -117,6 +117,8 @@ proxy: display-name: {{ app.display_name }} description: {{ app.description }} {% if app.cmd is defined %}container-cmd: ["R", "-e {{ app.cmd }}"]{% endif %} + + {% if app.full_cmd is defined %}container-cmd: ["{{ app.full_cmd }}"]{% endif %} container-image: {{ app.docker_image }} container-privileged: {{ app.container_privileged | default('false') }} @@ -131,6 +133,12 @@ proxy: stop-on-logout: {{ app.stop_on_logout | default('true') }} max-lifetime: {{ app.max_lifetime | default(shinyproxy_default_proxy_max_lifetime) }} +{% if app.extra_options is defined %} +{% for opt in app.extra_options %} + {{ opt.key }}: {{ opt.value }} +{% endfor %} +{% endif %} + {% endif %} {% if app.environment is defined %} @@ -140,6 +148,16 @@ proxy: {% endfor %} {% endif %} + {% if app.groups is defined %} + + access-groups: [{{ app.groups }}] + + {% endif %} + + {% if app.port is defined %}port: {{ app.port }}{% endif %} + + {% if app.container_volumes is defined %}container-volumes: [ {% for vol in app.container_volumes %} "{{ vol }}"{% if not loop.last %}, {% endif %}{% endfor %} ]{% endif %} + {% if shinyproxy_as_docker_service %} {% if shinyproxy_container_backend == 'docker-swarm' %} @@ -151,15 +169,6 @@ proxy: {% endif %} {% endif %} - {% if app.groups is defined %} - - access-groups: [{{ app.groups }}] - - {% endif %} - - {% if app.port is defined %}port: {{ app.port }}{% endif %} - - {% if app.container_volumes is defined %}container-volumes: [ {% for vol in app.container_volumes %} "{{ vol }}"{% if not loop.last %}, {% endif %}{% endfor %} ]{% endif %} {% endfor %} {% endif %}