Hi,
Very new to Traefik. I have a test setup with traefik and one backend. I have been using docker stack deploy
to test this. Everything was worked as expected, until I added --docker.swarmMode
. Once I enable this flag, my backend is skipped due to Filtering container without port
.
I'm unclear on if this is expected behavior? I would prefer the previous function whereby a container with a single exposed port automatically had that port selected for routing. Any clarification / assistance is appreciated.
PS - I edited the stack file to remove some HTTPS/LE-related startup flags, it may have some typos from this inline editing
version: "3.7"
services:
entrypoint:
image: traefik:1.7
command:
- "--api"
- "--docker"
# If I enable these two flags, I must also declare the port
# - "--docker.swarmMode"
# - "--docker.watch"
- "--entrypoints=Name:http Address::80"
- "--defaultentrypoints=http"
- "--logLevel=DEBUG"
# Traefik must run on a manager node for swarm mode operation
deploy:
placement:
constraints:
- node.role == manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "8080:8080"
gateway:
image: nginx:alpine
deploy:
labels:
# This is not needed if you do not pass the docker.swarmMode flag
# - "traefik.port=80"
- "traefik.frontend.rule=Host:staging.turnersoftware.net"