|
@@ -267,7 +267,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext
|
|
|
@classmethod
|
|
|
def parse(cls, spec):
|
|
|
if isinstance(spec, cls):
|
|
|
- # WHen extending a service with ports, the port definitions have already been parsed
|
|
|
+ # When extending a service with ports, the port definitions have already been parsed
|
|
|
return [spec]
|
|
|
|
|
|
if not isinstance(spec, dict):
|
|
@@ -316,7 +316,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext
|
|
|
def normalize_port_dict(port):
|
|
|
return '{external_ip}{has_ext_ip}{published}{is_pub}{target}/{protocol}'.format(
|
|
|
published=port.get('published', ''),
|
|
|
- is_pub=(':' if port.get('published') else ''),
|
|
|
+ is_pub=(':' if port.get('published') or port.get('external_ip') else ''),
|
|
|
target=port.get('target'),
|
|
|
protocol=port.get('protocol', 'tcp'),
|
|
|
external_ip=port.get('external_ip', ''),
|