Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cartridge.port is broken for DIY cartridges. #1

Open
bjansen opened this issue Dec 9, 2015 · 2 comments
Open

Cartridge.port is broken for DIY cartridges. #1

bjansen opened this issue Dec 9, 2015 · 2 comments

Comments

@bjansen
Copy link
Member

bjansen commented Dec 9, 2015

The following code fails when run on a DIY cartridge:

"The port you should bind to"
shared Integer port => requireInteger(environmentVariableName(name == "vertx" then "PORT" else "HTTP_PORT"));

The actual environment variable is not ending with HTTP_PORT:

OPENSHIFT_DIY_PORT=8080

@bjansen
Copy link
Member Author

bjansen commented Dec 9, 2015

I'm not sure why it's ending with HTTP_PORT when it's a Ceylon cartridge, the official doc seems to indicate it's always PORT: https://developers.openshift.com/en/managing-environment-variables.html#informational-variables

I guess we could invert the logic like this:

"The port you should bind to"
shared Integer port => requireInteger(environmentVariableName(name == "ceylon" then "HTTP_PORT" else "PORT"));

@FroMage
Copy link
Member

FroMage commented Dec 9, 2015

I'm fine with inverting the check. We could also try both...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants