diff --git a/compose/config/types.py b/compose/config/types.py index 6d3ca3f3b..4509bfe67 100644 --- a/compose/config/types.py +++ b/compose/config/types.py @@ -325,7 +325,7 @@ class ServicePort(namedtuple('_ServicePort', 'target published protocol mode ext @property def merge_field(self): - return (self.target, self.published) + return (self.target, self.published, self.external_ip, self.protocol) def repr(self): return dict( diff --git a/tests/unit/config/config_test.py b/tests/unit/config/config_test.py index d92a35c00..87bdd8bca 100644 --- a/tests/unit/config/config_test.py +++ b/tests/unit/config/config_test.py @@ -1865,7 +1865,7 @@ class ConfigTest(unittest.TestCase): { 'target': '1245', 'published': '1245', - 'protocol': 'tcp', + 'protocol': 'udp', } ] }