Skip to content

Commit 3317733

Browse files
author
Keerthan Mala
committed
fix(deploy): should deploy successfullly without web type in the procfile
1 parent d077bfe commit 3317733

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

rootfs/api/models/app.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,18 @@ def _default_structure(self, release):
393393
if not release.build.sha:
394394
structure = {'cmd': 1}
395395

396-
# if a dockerfile exists without a procfile, assume docker workflow
397-
elif release.build.dockerfile and not release.build.procfile:
396+
elif release.build.procfile and 'web' in release.build.procfile:
397+
structure = {'web': 1}
398+
399+
# if a dockerfile, assume docker workflow
400+
elif release.build.dockerfile:
398401
structure = {'cmd': 1}
399402

400-
# if a procfile exists without a web entry, assume docker workflow
403+
# if a procfile exists without a web entry and dockerfile, assume heroku workflow
404+
# and return empty structure as only web type needs to be created by default and
405+
# other types have to be manually scaled
401406
elif release.build.procfile and 'web' not in release.build.procfile:
402-
structure = {'cmd': 1}
407+
structure = {}
403408

404409
# default to heroku workflow
405410
else:

0 commit comments

Comments
 (0)