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

Add configurable port instead of hardcoding 8080 #176

Closed
decentral1se opened this issue Mar 31, 2020 · 5 comments
Closed

Add configurable port instead of hardcoding 8080 #176

decentral1se opened this issue Mar 31, 2020 · 5 comments
Labels
wontfix This will not be worked on

Comments

@decentral1se
Copy link

Is your feature request related to a problem? Please describe.
I am using dokku.viewdocs.io/dokku to deploy (open source Heroku) (using https://github.com/alerta/docker-alerta) which uses the proxy ports plugin (see https://github.com/dokku/dokku/blob/master/docs/networking/port-management.md) by default which reads the EXPOSE definition of the Dockerfile and maps that port to Nginx proxying. Since 8080 is such a common port, this conflicts with other containers. Dokku doesn't easily allow to do the usual -p 9090:8080 magic where you re-map the port. Hence, I need an application level port configuration.

Describe the solution you'd like
Have a configuration option to choose a new port so that I can override the Dockerfile and specify that new port with an EXPOSE .... definition.

Describe alternatives you've considered
Checked the docs... saw alerta/alerta#178...

Additional context
Unsure.

@satterly
Copy link
Member

satterly commented Apr 6, 2020

This sounds like a fundamental flaw of the tool you are using. I suggest you create your own Dockerfile and expose a port number other than 8080 if you really have to.

@satterly satterly closed this as completed Apr 6, 2020
@satterly satterly transferred this issue from alerta/alerta Apr 6, 2020
@decentral1se
Copy link
Author

Your opinions on Dokku are not cause to close this ticket. Whatever Dokku does is irrelevant, this ticket is about a lack of configurable port in Alerta. This ticket should be re-opened. Furthermore, adding a EXPOSE statement to a Dockerfile with a different port will not magically make Alerta change the port that it exposes itself on therefore making my new port useless.

@satterly
Copy link
Member

satterly commented Apr 7, 2020

The documentation you refer to recommends the same fix that I suggested above ...

If you would like to change the exposed port, you should do so within your Dockerfile.

https://github.com/dokku/dokku/blob/master/docs/networking/port-management.md#dockerfile

So create your own Dockerfile with a different EXPOSE port and modify the nginx.conf file to match... https://github.com/alerta/docker-alerta/blob/master/nginx.conf#L33

@satterly satterly added the wontfix This will not be worked on label Apr 7, 2020
@decentral1se
Copy link
Author

decentral1se commented Apr 8, 2020

Yes, I have also found this option in Dokku since I first posted. However, that is again irrelevant. This is about a configurable port in the alerta software. Why has this been marked wont-fix? Because there are other work arounds? It would be easier for some to pass the port in via an env var... even if you don't intend to do it yourself someone else could make this configurable if the ticket stays open?

@satterly
Copy link
Member

satterly commented Apr 9, 2020

Rereading the port management page again I clearly states that host->container port mapping is now supported ...

You can now configure host -> container port mappings with the proxy:ports-* commands. This mapping is currently supported by the built-in nginx-vhosts plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants