In production, do I have to have two domains if I want to use a load balancer with Discourse?

I’d recommend checking out Nginx Proxy Manager, the working of that, for your broader understanding.