Skip to content

Commit 6b4f890

Browse files
author
Matthew Fisher
committed
Merge pull request #834 from deis/procfile-mandatory
feat(controller): make Procfile mandatory
2 parents 332d695 + b81f4a8 commit 6b4f890

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

builder/templates/builder

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ if __name__ == '__main__':
5858
# check for Procfile
5959
dockerfile = os.path.join(temp_dir, 'Dockerfile')
6060
procfile = os.path.join(temp_dir, 'Procfile')
61-
if not os.path.exists(dockerfile) and os.path.exists(procfile):
61+
if not os.path.exists(procfile):
62+
raise Exception('Procfile must exist')
63+
if not os.path.exists(dockerfile):
6264
if os.path.exists('/buildpacks'):
6365
build_cmd = "docker run -i -a stdin -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
6466
else:

controller/api/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _get_scheduler(self):
258258
def _get_command(self):
259259
c_type = self.type
260260
if c_type:
261-
return 'start {c_type}'
261+
return "cat Procfile | grep ^{c_type} | cut -f 1 -d ' ' --complement | sh -"
262262
else:
263263
return ''
264264

0 commit comments

Comments
 (0)