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

Buildpacks default port #147

Open
collimarco opened this issue Nov 24, 2021 · 4 comments
Open

Buildpacks default port #147

collimarco opened this issue Nov 24, 2021 · 4 comments

Comments

@collimarco
Copy link

Do buildpacks define any convention about the default port to use for the web server?

I mean, if I need to route the HTTP requests to a container built with pack (it can be any application built with any builder), is there a default port / convention?

By default, should I route the traffic to port 80, 3000, 8080 or something else?

@jromero
Copy link
Member

jromero commented Dec 6, 2021

It's all dependant on the application and/or buildpacks configuration.

For example, here's some literature for:

@collimarco
Copy link
Author

Finally we decided to set a PORT env variable where the buildpack is used (e.g. inside Kubernetes).

This seems the de facto standard (also confirmed by your links).

@collimarco
Copy link
Author

Do you think that it would be useful to make the PORT env variable explicitly documented by Buildpacks? (writing for example that the application and any configurations generated automatically by pack must listen on PORT)

@jromero
Copy link
Member

jromero commented Dec 7, 2021

This is a good idea. Although given that this isn't a defined contract in the spec, I think the best we can do for the time being would be to consider it a convention.

We have Conventions in the Platform Guide, this may want to go under Application Developer Guide -> Conventions AND Buildpack Author Guide -> Conventions.

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