Support more configuration options.

This commit is contained in:
Andrea Dell'Amico 2022-04-27 19:19:01 +02:00
parent ac7a5ae5f9
commit 595b33d30d
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 18 additions and 9 deletions

View File

@ -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 %}