Traefik in docker container to route to other docker containers

Hi,

I’m new to Traefik and I’m sorry if this question is silly but I like what Traefik offers for multisites purposes and SSL.

Here is my situation:

  • I have 2 websites that somehow are related and are in different docker containers/stacks.
  • I have 1 domain SSL certificate

Q: I would like to know if I could set a docker container just for Traefik with the domain name SSL, that according to client requests, route his requests to the correct website (in different docker container).

  1. Is it a standard approach ?
  2. Where to start (example, articles) and test it on local machine before to run it in production VPS ?

thx

Sounds like very basic functionality of a reverse proxy. Check simple Traefik example, which uses Docker labels to automatically configure target services. Or check nginx-proxy example, which uses ENV vars.

Both will automatically create TLS cetificates for the used domain(s). Usually different services are mostly placed under different sub-domains.