pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.36k stars 67 forks source link

Expose default port (docker) #120

Closed JDPDO closed 2 years ago

JDPDO commented 2 years ago

If you are using an reverse proxy like nginx-proxy-automation containers have to be properly documented.

Exposing the default port adds the benefit that automated proxys and possible other tools are working out of the box.

wmnnd commented 2 years ago

Thanks for your suggestion!

Keila has two environment variables that can be configured for Keila: PORT and URL_PORT. PORT is used as the port the application is listening on (usually 4000) while URL_PORT is used as the port for generating public-facing URLs (usually 443 for HTTPS). Setting both variables to the same value may make sense in certain environments but won’t work in many other cases.

JDPDO commented 2 years ago

You're right. Setting URL_PORT is too much. Apart form that according to the Dockerfile reference EXPOSE documents which ports the application serves. It not changes the behaviour of current compositions nor container runs. Furthermore it allows usage of -P, --publish-all flag.

wmnnd commented 2 years ago

I think adding EXPOSE would be a good change, then! Could you modify your PR and also add the missing newline at the end of the Dockerfile?

JDPDO commented 2 years ago

I've inserted the newline and unset URL_PORT.

wmnnd commented 2 years ago

Your PR has now been merged, thank you! :heart: