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: