"Configuring Docker Swarm & Deploying / Exposing Services" shows how to use Configuration Discovery with Docker Swarm, I think it's automatically using all entryPoints
:
providers:
docker:
endpoint: "tcp://127.0.0.1:2377"
swarmMode: true
Is it possible to set a fixed entryPoint
for docker provider in the static configuration, so routing is always only done for websecure
on port 443? There seems to be no documentation about it.
It would also be great to statically enforce TLS and not having to use a label on every service.
Just to add: if I run Traefik Docker Swarm configuration discovery, I just don't want my services be available on other endpoints
I have created.
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
traefik:
address: :8080
metrics:
address: :8082
And I don't necessarily want to add the entrypoint
to every of my 100+ services if there is a single default. The services shouldn't need to know about traefik internals like "websecure". Even TLS I would like to set as default.
docker service create \
--name whoami \
--replicas 1 \
--hostname='{{.Node.Hostname}}' \
--network proxy \
--label 'traefik.enable=true' \
--label 'traefik.http.routers.whoami.tls=true' \
--label 'traefik.http.routers.whoami.entrypoints=websecure' \
--label 'traefik.http.routers.whoami.rule=Host(`whom.example.com`)' \
--label 'traefik.http.services.whoami.loadbalancer.server.port=80' \
traefik/whoami