24 lines
491 B
Django/Jinja
24 lines
491 B
Django/Jinja
services:
|
|
network-keepalive:
|
|
image: alpine
|
|
command: sleep infinity
|
|
networks:
|
|
- depinga
|
|
deploy:
|
|
mode: replicated
|
|
replicas: {{ item.replicas }}
|
|
restart_policy:
|
|
condition: {{ item.restart_condition }}
|
|
labels:
|
|
{% for key, val in item.labels.items() %}
|
|
{{ key }}: "{{ val }}"
|
|
{% endfor %}
|
|
placement:
|
|
constraints:
|
|
{% for constraint in item.constraints %}
|
|
- {{ constraint }}
|
|
{% endfor %}
|
|
|
|
networks:
|
|
depinga:
|