Multiple rule conditions in a router rule

I'm trying the map a host/path to a load balancer port. I keep the following error in my docker-compose.yaml.

"services.traefik.labels contains an invalid type, it should be an object, or an array"

Is something this possibe?

  • "traefik.http.routers.myservice.rule='Host(local.localdomain) && PathPrefix(/path1/)'"

Thanks

FWIW, I had the back ticks in the command. Can't seem to figure out the markup to get them in correctly.

labels:
          - "traefik.http.routers.myservice.rule=Host(`local.localdomain`) && PathPrefix(`/path1`)"

I'm still getting the error. :confused:

Resolved: I was not reading the error correctly. I had a labels section with no content. Commented the one line and yaml validates! Thanks