Allow null values for labels and ports, convert to empty lists
This commit is contained in:
parent
df476f1c61
commit
d68d96015e
@ -72,12 +72,19 @@ services:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if container.labels is defined %}
|
{% if container.labels is defined %}
|
||||||
|
{% if container.labels is none %}
|
||||||
|
labels: []
|
||||||
|
{% else %}
|
||||||
labels:
|
labels:
|
||||||
{% for label in container.labels %}
|
{% for label in container.labels %}
|
||||||
- {{ label }}
|
- {{ label }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if container.ports is defined %}
|
{% if container.ports is defined %}
|
||||||
|
{% if container.ports is none %}
|
||||||
|
ports: []
|
||||||
|
{% else %}
|
||||||
ports:
|
ports:
|
||||||
{% for port in container.ports %}
|
{% for port in container.ports %}
|
||||||
- {{ port }}
|
- {{ port }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user