emcniece / DockerYourXyzzy

Dockerized Cards Against Humanity clone - https://github.com/ajanata/PretendYoureXyzzy
71 stars 38 forks source link

Possible to change the base_url #5

Open ckanoab opened 4 years ago

ckanoab commented 4 years ago

I'd like to put xyz behind a reverse_proxy but it doesn't like being at a subdirectory. Can I specify a base_url in the docker run command?

spencerskinner99 commented 4 years ago

Would be great to have this ability, currently unable to run it as a subdomain with my DDNS provider so can only run as subdirectory but am faced with this error message every time

HTTP ERROR 404
Problem accessing /cah. Reason:

    Not Found
emcniece commented 4 years ago

I've recently published a docker-compose example featuring an ngrok tunnel, which should demonstrate how to run this container in most networking scenarios.

A reverse proxy such as Nginx or HAProxy or Traefik should be of similar configuration - the base_url param shouldn't need changing inside the container, routing should happen at the network layer outside the container. I think the network proxy should also handle URL rewriting so that public-facing paths end up routed to /cah or similar.

I think such networking configuration is outside the scope of this particular image as there are many possibilities... do you agree? We could probably come up with an Nginx example if that would help. 👍