-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix NGINX regression Docker Expose #2762
Conversation
RSS-Bridge#2721 introduced a regression by not properly declaring the exposed port in Dockerfile. The Apache version did it correctly: https://github.com/docker-library/php/blob/faf8864e3845ced80780c03eefc66c022e2f9ac1/8.1/buster/apache/Dockerfile#L289 The consequence is that other systems, e.g. Traefik, could not know what port to route to.
Why can't Traefik forward requests to 127.0.0.1:80? I don't understand the purpose of Also keep in mind that we have a configuration setting for changing the port that nginx binds to. In summary, maybe our docker setup isn't properly written for real production use. |
Of course it can be done manually and/or overridden but with a default EXPOSE, routing can be done automatically without having to hunt in the documentation which port each service is using internally. You can for instance try a Not related but just for the record, |
Reference for Traefik, but it is not specific to it: https://doc.traefik.io/traefik/providers/docker/#port-detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks for contributing! I won't merge this yet in case @dvikan has some comments.
You are correct. I'm running this in docker-compose with defined ports, but in a helm scenario, the automated port assigning wouldnt work. I'm approving this change, but there will probably be another change in the near future because I want to switch to the lsio nginx container. So thanks! |
[Core] Add expose to dockerfile (RSS-Bridge#2762)
#2721 introduced a regression by not properly declaring the exposed port in Dockerfile.
The Apache version did it correctly:
https://github.com/docker-library/php/blob/faf8864e3845ced80780c03eefc66c022e2f9ac1/8.1/buster/apache/Dockerfile#L289
The consequence is that other systems, e.g. Traefik, could not know what port to route to.