Skip to content

Commit 4ebe21f

Browse files
committed
Merge pull request #771 from helgi/ticket_767
fix(app): only add a PORT env var if there is a value
2 parents 27e9ed0 + c9cb586 commit 4ebe21f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

rootfs/api/models/app.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ def _scale_pods(self, scale_types):
331331
# http://docs.deis.io/en/latest/using_deis/process-types/#web-vs-cmd-process-types
332332
routable = True if scale_type in ['web', 'cmd'] else False
333333
# fetch application port and inject into ENV Vars as needed
334-
envs['PORT'] = release.get_port(routable)
334+
port = release.get_port(routable)
335+
if port:
336+
envs['PORT'] = port
335337

336338
kwargs = {
337339
'memory': release.config.memory,
@@ -384,7 +386,9 @@ def deploy(self, release):
384386
# http://docs.deis.io/en/latest/using_deis/process-types/#web-vs-cmd-process-types
385387
routable = True if scale_type in ['web', 'cmd'] else False
386388
# fetch application port and inject into ENV vars as needed
387-
envs['PORT'] = release.get_port(routable)
389+
port = release.get_port(routable)
390+
if port:
391+
envs['PORT'] = port
388392

389393
deploys[scale_type] = {
390394
'memory': release.config.memory,

0 commit comments

Comments
 (0)