-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker swarm mode doesn't seem to work #18
Comments
What version of docker are you running? If you do |
Thanks ! I'm running
And it doesn't exit 1, but 0
docker-compose, in case... traefik:
image: traefik:latest
healthcheck:
test: [ "CMD-SHELL", "traefik healthcheck" ]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
ports:
- target: 80
published: 80
protocol: tcp
mode: ingress
- target: 443
published: 443
protocol: tcp
mode: ingress
deploy:
labels:
- "trafficjam.proxy.container=true"
labels:
- "trafficjam.proxy.container=true"
depends_on:
- docker-socket-proxy
networks:
- default
- traefik-backend
volumes:
- ${SHARED_DIR}/traefik/traefik.yml:/traefik.yml:ro
- ${SHARED_DIR}/traefik/config:/config:ro
- acme:/acme
env_file: traefik.env
trafficjam:
image: kaysond/trafficjam
networks:
- default
depends_on:
- traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
NETWORK: traefik-backend
WHITELIST_FILTER: label=trafficjam.proxy.container=true
SWARM_DAEMON: "true"
TZ: Europe/Paris
DEBUG: 1
deploy:
replicas: 1
placement:
constraints: ['node.role==manager'] |
This line will always trigger the error if there's no traefik container running on the node, even with a 0 exit code. |
Ah yeah I didn't catch the end of the line there. I think I was trying to protect against inadvertently empty output despite a zero exit code but obviously there are valid scenarios with zero exit code and empty output. Should be an easy fix |
Context:
The service is deployed and it's working as expected for containers running on the same node as traefik, but not the others.
docker ps --filter
doesn't find anything on other nodes which is expected.Results: Containers running on nodes where traefik is not running can still talk to each other. Not sure how this can be fixed ?
Some logs:
logs from trafficjam service from the one running on the same node as traefik:
Logs from trafficjam service from the ones not running
The text was updated successfully, but these errors were encountered: