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!