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 |
|
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.