Add Support for Networks String List
This commit is contained in:
parent
ec7c196064
commit
effb62c3e6
@ -21,6 +21,11 @@ services:
|
||||
{% endif %}
|
||||
{% if container.networks is defined %}
|
||||
networks:
|
||||
{% if container.networks is iterable and (container.networks is not string and container.networks is not mapping) %}
|
||||
{% for network in container.networks %}
|
||||
- {{ network }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for network, params in container.networks.items() %}
|
||||
{{ network }}:
|
||||
{% if params.aliases is defined %}
|
||||
@ -31,6 +36,7 @@ services:
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if container.build is defined %}
|
||||
build: {{ container.build }}
|
||||
{% endif %}
|
||||
@ -219,6 +225,7 @@ services:
|
||||
{% if networks is defined %}
|
||||
networks:
|
||||
{% for network in networks %}
|
||||
{% if network.active %}
|
||||
{{ network.network_name }}:
|
||||
{% if network.external is defined %}
|
||||
external: {{ network.external }}
|
||||
@ -226,5 +233,6 @@ networks:
|
||||
{% if network.driver is defined %}
|
||||
driver: {{ network.driver }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user