Service Docker + of 1 PathPrefix

Hi, I have my firts steps with traefik on Docker swarm

I Have many aplicacitions web with multi paths prefix, my traefik is configured autodiscover service.

So, I have for example deployed a service as this

docker service create \
--name  ${SERVICE_NAME}  \
--network proxy \
--label "traefik.enable=true" \
--label "traefik.http.services.${SERVICE_NAME}.loadbalancer.server.port=80" \
**--label "traefik.http.routers.${SERVICE_NAME}.rule=Host(\`${SERVICE_NAME}.${CLUSTER_DOMAIN}\`) && PathPrefix(\`/siteone\`) || PathPrefix(\`/sitetwo\`)" \**
$REGISTRY_DOMAIN:$REGISTRY_PORT/nginx:path

I have a question about values pathprefix, what is the best line to deploy a service autodiscover.
I will like deploy as this:

(...)
--label "traefik.http.routers.${SERVICE_NAME}.rule=Host(\`${SERVICE_NAME}.${CLUSTER_DOMAIN}\`) 
--label "traefik.http.routers.${SERVICE_NAME}.rule=PathPrefix(\`/siteone\`)" \
--label "traefik.http.routers.${SERVICE_NAME}.rule=PathPrefix(\`/sitetwo\`)" \
(...)

But I cant .
some suggestion?

Thanks!

Hello,

the labels are a map, so the keys are unique.

The rule is an expression: https://docs.traefik.io/v2.1/routing/routers/#rule

--label "traefik.http.routers.${SERVICE_NAME}.rule=Host(\`${SERVICE_NAME}.${CLUSTER_DOMAIN}\`) && (PathPrefix(\`/siteone\`) || PathPrefix(\`/sitetwo\`))" \

Hi, thanks for your help @idez

I understand, so this is correct to multiple values to PathPrefix config autodiscover.

(...)
--label "traefik.http.routers.${SERVICE_NAME}.rule=Host(\`${SERVICE_NAME}.${CLUSTER_DOMAIN}\`) && PathPrefix(\`/siteone\`) || PathPrefix(\`/sitetwo\`)" \
(...)

Thanks!