ansible-role-shinyproxy/templates/shinyproxy-docker-compose.y...

37 lines
954 B
Plaintext
Raw Normal View History

version: '3.6'
2020-09-23 16:40:51 +02:00
services:
shinyproxy:
{% if shinyproxy_container_backend == 'docker' %}
2020-09-23 16:40:51 +02:00
build: .
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
- {{ shinyproxy_as_docker_src_dir }}/application.yml:/opt/shinyproxy/application.yml:ro
networks:
- {{ shinyproxy_docker_network }}
{% if shinyproxy_container_backend == 'docker-swarm' %}
2020-09-23 16:40:51 +02:00
deploy:
mode: replicated
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
{% endif %}
2020-10-08 15:28:27 +02:00
{% if shinyproxy_docker_log_to_journal %}
logging:
driver: 'journald'
{% endif %}
2020-09-23 16:40:51 +02:00
networks:
{{ shinyproxy_docker_network }}: