conductor-setup/roles/conductor/templates/conductor-swarm.yaml.j2

66 lines
1.6 KiB
Plaintext
Raw Normal View History

2020-10-27 15:46:46 +01:00
version: '3.6'
{% set clustered = (cluster_replacement is defined and cluster_replacement) or (cluster_check is defined and cluster_check) %}
2020-10-27 15:46:46 +01:00
services:
{{ conductor_service }}:
2020-10-27 15:46:46 +01:00
environment:
- CONFIG_PROP={{ conductor_config }}
2021-05-18 15:10:08 +02:00
image: "{{ conductor_image }}"
2020-10-27 15:46:46 +01:00
networks:
- {{ conductor_network }}
deploy:
mode: replicated
replicas: {{ conductor_replicas }}
2021-05-18 15:10:08 +02:00
{% if infrastructure != 'local' %}
2020-10-27 15:46:46 +01:00
placement:
constraints: [node.role == worker]
2021-05-18 15:10:08 +02:00
{% endif %}
2020-10-27 15:46:46 +01:00
restart_policy:
condition: on-failure
delay: 5s
window: 120s
configs:
- source: swarm-config
target: /app/config/{{ conductor_config }}
2020-10-27 15:46:46 +01:00
logging:
driver: "journald"
{{ conductor_ui_service }}:
2020-10-27 15:46:46 +01:00
environment:
2021-06-01 10:10:26 +02:00
- WF_SERVER={{ conductor_service_url }}
{% if conductor_auth is defined %}
- AUTH_CONFIG_PATH=/app/config/auth.config
2021-06-01 10:10:26 +02:00
{% endif %}
2021-05-18 15:10:08 +02:00
image: "{{ conductor_ui_image }}"
2020-10-27 15:46:46 +01:00
networks:
- {{ conductor_network }}
2021-05-18 15:10:08 +02:00
{% if conductor_auth is defined %}
configs:
- source: auth-config
target: /app/config/auth.config
2021-05-18 15:10:08 +02:00
{% endif %}
2020-10-27 15:46:46 +01:00
deploy:
mode: replicated
2021-05-18 15:10:08 +02:00
replicas: {{ conductor_ui_replicas }}
{% if infrastructure != 'local' %}
2020-10-27 15:46:46 +01:00
placement:
constraints: [node.role == worker]
2021-05-18 15:10:08 +02:00
{% endif %}
2020-10-27 15:46:46 +01:00
restart_policy:
condition: on-failure
delay: 5s
window: 120s
networks:
{{ conductor_network }}:
configs:
swarm-config:
file: ./{{ conductor_config }}
2021-05-18 15:10:08 +02:00
{% if conductor_auth is defined %}
auth-config:
file: ./auth.cfg
2021-05-18 15:10:08 +02:00
{% endif %}