Hi, Can anyone explain to how to use path based routing for directing container A to /projectA and container B under /projectB (Both using the same host btw) and serve the underlying css, js resources? What I have tried so far:
- traefik.frontend.rule=Host:docs.domain.com;PathPrefix:/projectA - traefik.frontend.rule=Host:docs.domain.com;PathPrefix:/projectB
The docs on the rules are confusing.
Hi,
To serve the content of the containerA to the path /projectA and to serve the content of the containerB to the path /projectB, you should do that:
/projectA
/projectB
containerA: image: user/my-image-A labels: - "traefik.frontend.rule=Host:docs.domain.com;PathPrefix:/projectA" containerB: image: user/my-image-B labels: - "traefik.frontend.rule=Host:docs.domain.com;PathPrefix:/projectB"
Thank you @ldez. It works like a charm.