How to use Domain instead of IP:Port, Nginx, Docker compose!


I have a VPS server running Ubuntu
i have installed a Node.js website using Docker Compose and i have Nginx webserver as well

I can access my website using IP:Port only
How can i access my website using my domain?

I saw many tutorials about Reverse Proxy and stuff like that but i’m not familiar with it,
tbh, spent about 6 days trying to find out how to do that but never found any solution yet
Thanks in advance :slight_smile:

I’m also suffering from the same situation

The problem and solution are not really docker specific. Generally, you need to point your dns entry to the host and run your application on port 80 and 443 to make it reachable using http://domain and https://domain.

Point your dns entry to your docker host, publish container ports 80 and 443 of your application container, or preferably a reverse proxy container, if you intend to make more than one container reachable through the reverse proxy.

I am sure google will yield many blog posts that explain how to use Caddy, Traefik, nginx-proxy, or Nginx Proxy Manager as a reverse proxy container.