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 %}
|
||||
{% endif %}
|
||||
{% if container.labels is defined %}
|
||||
{% if container.labels is none %}
|
||||
labels: []
|
||||
{% else %}
|
||||
labels:
|
||||
{% for label in container.labels %}
|
||||
- {{ label }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if container.ports is defined %}
|
||||
{% if container.ports is none %}
|
||||
ports: []
|
||||
{% else %}
|
||||
ports:
|
||||
{% for port in container.ports %}
|
||||
- {{ port }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user