82 lines
1.8 KiB
Django/Jinja
82 lines
1.8 KiB
Django/Jinja
version: '3.6'
|
|
|
|
{% set clustered = (cluster_replacement is defined and cluster_replacement) or (cluster_check is defined and cluster_check) %}
|
|
|
|
services:
|
|
conductor-server:
|
|
environment:
|
|
- CONFIG_PROP={{ conductor_config }}
|
|
image: nubisware/conductor-server
|
|
networks:
|
|
- {{ conductor_network }}
|
|
{% if clustered %}
|
|
- {{ haproxy_docker_overlay_network }}
|
|
{% endif %}
|
|
{% if not clustered %}
|
|
ports:
|
|
- "8080:8080"
|
|
{% endif %}
|
|
deploy:
|
|
mode: replicated
|
|
replicas: {{ conductor_replicas }}
|
|
{% if clustered %}
|
|
endpoint_mode: dnsrr
|
|
{% endif %}
|
|
placement:
|
|
constraints: [node.role == worker]
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
configs:
|
|
- source: swarm-config
|
|
target: /app/config/{{ conductor_config }}
|
|
|
|
logging:
|
|
driver: "journald"
|
|
|
|
conductor-ui:
|
|
environment:
|
|
- WF_SERVER=http://conductor-server:8080/api/
|
|
- AUTH_CONFIG_PATH=/app/config/auth.config
|
|
image: nubisware/conductor-ui
|
|
networks:
|
|
- {{ conductor_network }}
|
|
{% if clustered %}
|
|
- {{ haproxy_docker_overlay_network }}
|
|
{% endif %}
|
|
{% if not clustered %}
|
|
ports:
|
|
- "5000:5000"
|
|
{% endif %}
|
|
configs:
|
|
- source: auth-config
|
|
target: /app/config/auth.config
|
|
deploy:
|
|
mode: replicated
|
|
replicas: {{ conductor_replicas }}
|
|
{% if clustered %}
|
|
endpoint_mode: dnsrr
|
|
{% endif %}
|
|
placement:
|
|
constraints: [node.role == worker]
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
|
|
networks:
|
|
{{ conductor_network }}:
|
|
{% if clustered %}
|
|
{{ haproxy_docker_overlay_network }}:
|
|
external: True
|
|
{% endif %}
|
|
|
|
configs:
|
|
swarm-config:
|
|
file: ./{{ conductor_config }}
|
|
auth-config:
|
|
file: ./auth.cfg
|