0

In a traditional setup I'd have 3 servers each with a different subdomain pointed at them. My API on one server, frontend on another etc.

But when using docker on a single server and have my services in containers instead of servers how do I go about pointing different domains to the containers?

Would I need to put a proxy in front of the docker server and proxy the requests to the containers that way? I was hoping to automate this and avoid having to set up a proxy server manually/scripting.

1 Answer 1

1

If you have multiple services (e.g. web servers) listening on the same port, you indeed need to proxy the docker backends and point the domains to the proxy server. Note that the proxy can be running in its own container if you configure the different containers accordingly.

Alternatively, in case of an API, it might be possible to point this to a different port if this is acceptable in your environment and thus avoid the proxy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .