g3w-suite / g3w-suite-docker

Run G3W-SUITE stack with docker-compose
https://g3w-suite.readthedocs.io/en/latest/docker.html
32 stars 34 forks source link

Changing port in docker compose is not enough to have it work in restricted environment #124

Open moovida opened 3 months ago

moovida commented 3 months ago

Checklist

Subject of the issue

If you want to run the docker compose on port 80, changing the port in the compose yml works only partially.

Steps to reproduce

  1. edit the docker-compose.yml and change the nginx part from
  nginx:
    image: nginx
    ports:
      - "8080:8080"

to

  nginx:
    image: nginx
    ports:
      - "80:8080"
  1. run the suite in an environment in which port 8080 is blocked
  2. load a project and ho on the project's map page

You should experience a timeout due to the fact that there is a call going to something like:

http://yourhost:8080/api/config/1/qdjango/1?_t=1725437423.358987

Environment

Link to your project

No response

Additional info

No response

Raruto commented 2 months ago

@moovida Does it work if you change any of these too?

https://github.com/g3w-suite/g3w-suite-docker/blob/eba4849f0a25a52cdb0eb9dfebff4b102baa7bab/config/nginx/django#L19

https://github.com/g3w-suite/g3w-suite-docker/blob/eba4849f0a25a52cdb0eb9dfebff4b102baa7bab/config/nginx/django#L15

👋 Raruto

moovida commented 2 months ago

No, it should not, these should be the internal mappings, and should be ok listening to 8080, because that is the port docker maps the 80 to, if set.

If I unlock the 8080 from the firewall, but leave the 80:8080 mapping, it still does not work, which is what I expected. So the thing is that most of the application is redirected properly to/from 80, but then there is this one call that seems to be hardcoded to go to 8080 instead of the mapped port.

Or at least that is what I suspect, but I am wildly guessing, I suppose :-)