CloudFlare & DigitalOcean
I deployed cloudflare with docker on my DigitalOcean droplet. Then I have set up a zero trust tunnel. With the url localhost. In the end this didn't worked. So I had to use the public IP. Does someone know why it's not possible to use localhost:8080 for example, when the cloudflare container runs on the same host?
6 Replies
localhost
is referring to the Docker container itself, and not the droplet. To hit whatever server you have set up, they need to be on the same Docker network, then you could point the Tunnel to it like this: http://somecontainer:8080
But on the same host are multiple containers running. So they should be on the same docker network, right?
By default, yes. You should then be able to route traffic to them by using their hostname
In this case I nee to get the host name of the other two containers and that’s it?
Yes, plus the port the containers expose their service on(if it is 80, it should be fine to omit). The hostnames should be the name of the container, by default anyway
Thank you very much for your help 🙏🏻