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