From b111ef63224f0f08d999e197f9b63675ffe4ee76 Mon Sep 17 00:00:00 2001 From: aiordache Date: Wed, 9 Sep 2020 10:23:10 +0200 Subject: [PATCH] Re-enable 0 scale/deploy.replicas Signed-off-by: aiordache --- compose/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/project.py b/compose/project.py index a5bb39b93..420cb6548 100644 --- a/compose/project.py +++ b/compose/project.py @@ -311,12 +311,12 @@ class Project: return 1 if scale is None else scale replicas = deploy_dict.get('replicas', None) - if scale and replicas: + if scale is not None and replicas is not None: raise ConfigurationError( "Both service.scale and service.deploy.replicas are set." " Only one of them must be set." ) - if replicas: + if replicas is not None: scale = replicas if scale is None: return 1