I'm currently trying to get traefik to use multiple routers and services on a single container, which isn't working and i don't know if this is intended at all.
Why?
Specificly i'm using an gitlab omnibus container and wanted to use / access multiple services inside the omnibus container since gitlab is providing not only "the gitlab website" with it.
What did i try?
I simply tried adding another router to my docker compose file via labels
This is what i have:
labels:
- "traefik.http.routers.gitlab.rule=Host(`gitlab.example.com`)"
- "traefik.http.services.gitlab.loadbalancer.server.port=80"
This is what i want:
labels:
- "traefik.http.routers.gitlab.rule=Host(`gitlab.example.com`)"
- "traefik.http.services.gitlab.loadbalancer.server.port=80"
- "traefik.http.routers.registry.rule=Host(`registry.gitlab.example.com`)"
- "traefik.http.services.registry.loadbalancer.server.port=5000"
This doesn't work since traefik probably getting confused with what to route to which service and i couldn't find a mechanism that tells traefik exactly which router goes to which service in a case like this.
Is this even possible or am i just missing a little bit of traefik magic?