diff --git a/lib/actions/build.coffee b/lib/actions/build.coffee index e9c9c8a5..f57f3834 100644 --- a/lib/actions/build.coffee +++ b/lib/actions/build.coffee @@ -20,6 +20,12 @@ buildProject = (docker, logger, composeOpts, opts) -> composeOpts.projectName ) .then (project) -> + if project.descriptors.length > 1 and not opts.app.application_type?[0]?.supports_multicontainer + logger.logWarn( + 'Target application does not support multiple containers.\n' + + 'Continuing with build, but you will not be able to deploy.' + ) + compose.buildProject( docker logger diff --git a/lib/actions/deploy.coffee b/lib/actions/deploy.coffee index 4ec4e436..45474103 100644 --- a/lib/actions/deploy.coffee +++ b/lib/actions/deploy.coffee @@ -26,6 +26,9 @@ deployProject = (docker, logger, composeOpts, opts) -> opts.image ) .then (project) -> + if project.descriptors.length > 1 and !opts.app.application_type?[0]?.supports_multicontainer + throw new Error('Target application does not support multiple containers. Aborting!') + # find which services use images that already exist locally Promise.map project.descriptors, (d) -> # unconditionally build (or pull) if explicitly requested