2020-11-09 19:04:39 +01:00
|
|
|
version: '3.8'
|
2020-10-26 19:06:43 +01:00
|
|
|
|
|
|
|
networks:
|
|
|
|
{% if shinyproxy_container_backend == 'docker-swarm' %}
|
|
|
|
haproxy-public:
|
|
|
|
external: true
|
|
|
|
{% endif %}
|
|
|
|
{{ shinyproxy_docker_network }}:
|
2020-09-23 16:40:51 +02:00
|
|
|
|
2020-11-09 19:00:50 +01:00
|
|
|
configs:
|
|
|
|
shinyproxy_conf:
|
2020-11-17 12:25:50 +01:00
|
|
|
file: {{ shinyproxy_as_docker_src_dir }}/application.yml
|
2020-09-23 16:40:51 +02:00
|
|
|
services:
|
|
|
|
shinyproxy:
|
2020-10-07 18:11:05 +02:00
|
|
|
{% if shinyproxy_container_backend == 'docker' %}
|
2020-09-23 16:40:51 +02:00
|
|
|
build: .
|
2020-10-07 18:11:05 +02:00
|
|
|
ports:
|
|
|
|
- '{{ shinyproxy_http_port }}':'{{ shinyproxy_http_port }}'
|
|
|
|
{% else %}
|
|
|
|
image: {{ shinyproxy_docker_image }}
|
|
|
|
{% endif %}
|
2020-09-23 16:40:51 +02:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2020-11-09 19:00:50 +01:00
|
|
|
configs:
|
|
|
|
- source: shinyproxy_conf
|
2020-11-17 12:25:50 +01:00
|
|
|
target: {{ shinyproxy_conf_dir }}/application.yml
|
2020-11-09 19:00:50 +01:00
|
|
|
mode: 0400
|
2020-10-12 17:24:02 +02:00
|
|
|
networks:
|
|
|
|
- {{ shinyproxy_docker_network }}
|
2020-10-26 19:06:43 +01:00
|
|
|
{% if shinyproxy_container_backend == 'docker-swarm' %}
|
|
|
|
- haproxy-public
|
|
|
|
{% endif %}
|
2020-10-07 18:11:05 +02:00
|
|
|
{% if shinyproxy_container_backend == 'docker-swarm' %}
|
2020-09-23 16:40:51 +02:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
2020-10-06 19:16:02 +02:00
|
|
|
replicas: {{ shinyproxy_docker_swarm_replicas }}
|
|
|
|
endpoint_mode: dnsrr
|
2020-09-23 16:40:51 +02:00
|
|
|
placement:
|
|
|
|
constraints: [node.role == manager]
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
|
|
|
delay: 5s
|
|
|
|
max_attempts: 3
|
|
|
|
window: 120s
|
2020-10-07 18:11:05 +02:00
|
|
|
{% endif %}
|
2020-10-08 15:28:27 +02:00
|
|
|
{% if shinyproxy_docker_log_to_journal %}
|
2020-10-06 19:23:29 +02:00
|
|
|
logging:
|
|
|
|
driver: 'journald'
|
2020-10-06 19:16:02 +02:00
|
|
|
{% endif %}
|
2020-09-23 16:40:51 +02:00
|
|
|
|