Hi everyone,
I am currently using Docker on an OVH VPS. I have a container which contains the ERPNext software, which is mapped to port 8080 on the VPS.
What I want is for my software to be accessible via my domain name.
This problem is neither caused, nor solved by docker.
Just configure the dns entry in the dns server where you manage the domain, and configure the dns entry to resolve the domain name to the ip of the host.
That’s right. DNS has nothing to do with ports, it just resolved a domain name to an IP.
When accessing your app, you need to specify the port in your URL, when it’s not default 80:
http://example.com:8080
You can also remap the external port of a Docker container with -p 80:8080 (or equivalent in compose).
Finally, it’s best practice to use a reverse proxy to run multiple services on one IP, it can also handle TLS termination, check nginx-proxy and simple Traefik example.