I'm running a small dev/testing stack with services available through traefik and some directly accessible. My idea was to seperate them on network level but I'll remove it for testing purposes. Thanks!
and here are my labels (i will assume you have the volume all correct and ports published (you are explicitly publishing ports in the docker compose file / stack right?)
all of these labels seem to be required in swarm when dashboard is secure mode and https acme is used - removal of anyone of these labels and it will fail. BTW you don't need the && path - IIRC that might have broken mine when i tried it (i found ZERO blogs, articles etc that showed how to get this right in swarm despite what said articles claimed)
i did reply, akismet blocked it, no idea why, hopefully my detailed reply will show up
my post includes my working setup - took me about 6 hours to figure it out none of the blogs / articles / or docs were entirely correct..... very annoying. If i my other post doesn't work you may have to share the whole of your compose/stack. (i can share mine, i don't be default as my use of configs and gluster file system plugin confuses people, lol)
We recommend to use a "Host Based rule" as Host(traefik.example.com) to match everything on the host domain, or to make sure that the defined rule captures both prefixes:
but serves a combination of both as configuration example.
# The dashboard can be accessed on http://traefik.example.com/dashboard/
rule = "Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
I can believe it. I found while learning that the documents are inconsistent and wrong in multiple places. Not to mention confusing. Yes they are pretty - but i would go for accuracy over pretty any day. Plus why some directives have examples in file, docker, comman, env var and some don't have all examples - very annoying. Oh and sometimes the key pairs is the 'dotted' docker label notation match the json file directive names, and some times they dont. total mess
nginx CE docs might be fugly as hell, but they are darn accurate and usable..... (yeah thrown down lol)