SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.49k stars 297 forks source link

bug in routing https traffic in case of multiple copies of same docker #364

Open rogervdf opened 1 week ago

rogervdf commented 1 week ago

We are using your solution for example on one server with 25 different domains. There are copies of the same docker image being used acrcoss different domains for technical reasons, as follows:

under https-portal: battery.x.y -> x-datafeed-battery:80 #production

and then

  x-datafeed-battery:
    container_name: monitoring_battery
    image: registry.bla.bla:5001/image_x:latest

The other copies of this docker image are NOT being routed with https. They are run as a part of the same compose to get them online and they run cron jobs. But they are not referenced in https-portal.

  x-datafeed:
    container_name: monitoring_datafeed
    image: registry.bla.bla:5001/image_x:latest

For some reason, traffic that is routed to battery.x.y is seen in logs and activity of x-datafeed and other ones like it.

Where would we begin to debug this? Is it somehow relevant that the same docker image is used multiple times?

SteveLTN commented 2 days ago

I believe on one compose, only ONE container can listen to a certain port. I'm sure HTTPS-PORTAL needs to listen to 80 and 443. I would have a look which ports each container is listening to.