desaster55
(Desaster55)
September 10, 2025, 10:02am
1
Hello
Anybody, have an idea about how to differentiate between hostname and public IP in docker-compose file.?
I want to create container with hostname ex : gilab-ce.com as hostname to access but on public IP .
how to implement in docker compose file .?
Thank you
bluepuma77
(Bluepuma77)
September 10, 2025, 2:06pm
2
This is the job of a reverse proxy, like Traefik, nginx, caddy or haproxy. It will also handle https TLS encryption.
Check simple Traefik example or nginx-proxy example.
meyay
(Metin Y.)
September 10, 2025, 5:50pm
3
Just to be sure: setting up the DNS a-record that resolves to the public ip needs to be done where ever you administrate the DNS hosted zone. This has nothing to do with docker.