Hi,
I have found this error many times in Google, but nothing seems to fit my situation: I want to map two different routers to one service like so:
interest_v1:
image: my.registry.com/knipknap/spiff-mm-interest:latest
networks:
- traefik-public
- spiff-backend
deploy:
labels:
- micromodel=true
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.spiff-backend-grpcui-interest-h2c.rule=Host(`grpc.interest.api.mydomain.com`)
- traefik.http.routers.spiff-backend-grpcui-interest-h2c.entrypoints=grpc
- traefik.http.routers.spiff-backend-grpcui-interest-h2c.tls=true
- traefik.http.routers.spiff-backend-grpcui-interest-h2c.tls.certresolver=le
- traefik.http.services.spiff-backend-grpcui-interest-h2c.loadbalancer.server.scheme=h2c
- traefik.http.services.spiff-backend-grpcui-interest-h2c.loadbalancer.server.port=8181
- traefik.http.routers.spiff-backend-grpcui-interest-https.rule=Host(`interest.api.mydomain.com`)
- traefik.http.routers.spiff-backend-grpcui-interest-https.entrypoints=https
- traefik.http.routers.spiff-backend-grpcui-interest-https.tls=true
- traefik.http.routers.spiff-backend-grpcui-interest-https.tls.certresolver=le
- traefik.http.services.spiff-backend-grpcui-interest.loadbalancer.server.port=8080
This leads to this:
"Could not define the service name for the router: too many services"
I found hints that I should add
- traefik.http.routers.spiff-backend-grpcui-interest-h2c.service=interest_v1
- traefik.http.routers.spiff-backend-grpcui-interest-https.service=interest_v1
But that also doesn't work; the error then is "no such service: interest_v1@docker". How can I make both these services available?