37 lines
810 B
Plaintext
37 lines
810 B
Plaintext
|
version: '3.6'
|
||
|
|
||
|
services:
|
||
|
{% for workers in conductor_workers %}
|
||
|
{{ workers.service }}:
|
||
|
environment:
|
||
|
CONDUCTOR_SERVER: {{ conductor_workers_server }}
|
||
|
configs:
|
||
|
- source: {{workers.service}}-config
|
||
|
target: /app/config.cfg
|
||
|
image: '{{ workers.image }}'
|
||
|
networks:
|
||
|
- {{ conductor_network }}
|
||
|
deploy:
|
||
|
mode: replicated
|
||
|
replicas: {{ workers.replicas }}
|
||
|
placement:
|
||
|
constraints: [node.role == worker]
|
||
|
restart_policy:
|
||
|
condition: on-failure
|
||
|
delay: 5s
|
||
|
max_attempts: 3
|
||
|
window: 120s
|
||
|
logging:
|
||
|
driver: "journald"
|
||
|
|
||
|
{% endfor %}
|
||
|
|
||
|
networks:
|
||
|
{{ conductor_network }}:
|
||
|
|
||
|
configs:
|
||
|
{% for workers in conductor_workers %}
|
||
|
{{workers.service}}-config:
|
||
|
file: {{workers.service}}-config.cfg
|
||
|
{% endfor %}
|