2025-07-16 17:14:16 -06:00

24 lines
504 B
Django/Jinja

services:
nginx:
image: nginx:latest
ports:
- target: 80
published: 8080
protocol: tcp
mode: ingress
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 %}