Fixes to the tasks that install as docker service
This commit is contained in:
parent
df5a4eb5b2
commit
aebedb0ed0
|
@ -22,6 +22,7 @@ shinyproxy_default_apps: True
|
|||
shinyproxy_as_docker_src_dir: /srv/shinyproxy_service
|
||||
shinyproxy_as_docker_service_name: 'shinyproxy'
|
||||
shinyproxy_docker_network: 'shinyproxy'
|
||||
shinyproxy_docker_swarm_replicas: 2
|
||||
# Shinyproxy configuration
|
||||
# docker, docker-swarm, kubernetes
|
||||
shinyproxy_container_backend: 'docker'
|
||||
|
|
|
@ -31,4 +31,5 @@ dependencies:
|
|||
version: master
|
||||
name: openjdk
|
||||
state: latest
|
||||
when: not shinyproxy_as_docker_service
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
- name: Install the shinyproxy docker file
|
||||
template: src=Dockerfile.j2 dest={{ shinyproxy_as_docker_src_dir }}/Dockerfile owner=root group=root mode=0444
|
||||
|
||||
- name: Create the docker network used by shinyproxy
|
||||
docker_network:
|
||||
name: '{{ shinyproxy_docker_network }}'
|
||||
driver: overlay
|
||||
state: present
|
||||
# - name: Create the docker network used by shinyproxy
|
||||
# docker_network:
|
||||
# name: '{{ shinyproxy_docker_network }}'
|
||||
# driver: overlay
|
||||
# state: present
|
||||
|
||||
- name: Install the docker compose file
|
||||
template: src=shinyproxy-docker-compose.yml.j2 dest={{ shinyproxy_as_docker_src_dir }}/docker-compose.yml
|
||||
|
@ -24,4 +24,6 @@
|
|||
project_src: '{{ shinyproxy_as_docker_src_dir }}'
|
||||
build: yes
|
||||
|
||||
run_once: True
|
||||
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
||||
tags: [ 'shinyproxy', 'shinyproxy_docker', 'docker' ]
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
version: '3.8'
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
shinyproxy:
|
||||
build: .
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
ports:
|
||||
- '{{ shinyproxy_http_port }}':'{{ shinyproxy_http_port }}'
|
||||
#ports:
|
||||
# - '{{ shinyproxy_http_port }}':'{{ shinyproxy_http_port }}'
|
||||
expose:
|
||||
- "{{ shinyproxy_http_port }}"
|
||||
networks:
|
||||
- '{{ shinyproxy_docker_network }}'
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
replicas: {{ shinyproxy_docker_swarm_replicas }}
|
||||
endpoint_mode: dnsrr
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
restart_policy:
|
||||
|
@ -19,8 +22,11 @@ services:
|
|||
delay: 5s
|
||||
max_attempts: 3
|
||||
window: 120s
|
||||
{% if docker_log_to_journal %}
|
||||
log_driver: 'journald'
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
'{{ shinyproxy_docker_network }}':
|
||||
driver: overlay
|
||||
attachable: true
|
||||
attachable: true
|
||||
|
|
Loading…
Reference in New Issue