One replica. Choose betwen mount the configuration file or use it as a config.

This commit is contained in:
Andrea Dell'Amico 2020-12-29 16:35:31 +01:00
parent f308dc5c0c
commit 89e6897a31
2 changed files with 9 additions and 1 deletions

View File

@ -26,7 +26,8 @@ shinyproxy_docker_image: 'adellamisti/shinyproxy:latest'
shinyproxy_as_docker_service_name: 'shinyproxy'
shinyproxy_as_docker_src_dir: /srv/{{ shinyproxy_as_docker_service_name }}_service
shinyproxy_docker_network: 'shinyproxy'
shinyproxy_docker_swarm_replicas: 2
shinyproxy_docker_swarm_replicas: 1
shinyproxy_docker_mount_conf_file: True
shinyproxy_docker_log_to_journal: True
# Shinyproxy configuration
# docker, docker-swarm, kubernetes

View File

@ -7,9 +7,11 @@ networks:
{% endif %}
{{ shinyproxy_docker_network }}:
{% if not shinyproxy_docker_mount_conf_file %}
configs:
shinyproxy_conf:
file: {{ shinyproxy_as_docker_src_dir }}/application.yml
{% endif %}
services:
shinyproxy:
{% if shinyproxy_container_backend == 'docker' %}
@ -21,10 +23,15 @@ services:
{% endif %}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
{% if shinyproxy_docker_mount_conf_file %}
- {{ shinyproxy_as_docker_src_dir }}/application.yml:{{ shinyproxy_conf_dir }}/application.yml
{% endif %}
{% if not shinyproxy_docker_mount_conf_file %}
configs:
- source: shinyproxy_conf
target: {{ shinyproxy_conf_dir }}/application.yml
mode: 0400
{% endif %}
networks:
- {{ shinyproxy_docker_network }}
{% if shinyproxy_container_backend == 'docker-swarm' %}