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

Instead of using port 8080 in Docker image, use the value of $PORT #832

Closed
darinpope opened this issue Sep 9, 2020 · 2 comments · Fixed by #850
Closed

Instead of using port 8080 in Docker image, use the value of $PORT #832

darinpope opened this issue Sep 9, 2020 · 2 comments · Fixed by #850
Labels
Milestone

Comments

@darinpope
Copy link

Summary

I've tried using the Docker image on both Heroku and Google Cloud Run. Both of these services expect to be able to inject the listener port into the container via the $PORT environment variable.

Instead of hardcoding the port to 8080, allow for the listener port to use the $PORT environment variable and then fall back to 8080 if there is no $PORT environment variable defined.

Supporting docs

Note:

  • You can set a port for GCR, but since GCR's standard behavior is the same as Heroku's (read $PORT), it would be nice to have the $PORT environment variable available.
@acelaya
Copy link
Member

acelaya commented Sep 10, 2020

Sounds good. It shouldn't be super hard to do.

@acelaya acelaya added this to the 2.4.0 milestone Sep 13, 2020
@acelaya
Copy link
Member

acelaya commented Oct 3, 2020

Hey @darinpope, I have just implemented this. Shlink 2.4.0 will support providing the PORT env var while running the docker image in order to change the port in which shlink listens.

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

Successfully merging a pull request may close this issue.

2 participants