Use host-mode networking to get client IPs
continuous-integration/drone/push Build is failing Details

See https://dockerswarm.rocks/traefik/#getting-the-client-ip
This commit is contained in:
3wc 2020-10-20 13:03:00 +02:00
parent 6abd637efa
commit ca4210fe86
1 changed files with 9 additions and 5 deletions

View File

@ -5,10 +5,15 @@ services:
traefik: traefik:
image: "traefik:2.3.1" image: "traefik:2.3.1"
ports: ports:
- "80:80" - target: 80
- "443:443" published: 80
- "587:587" mode: host
- "2222:2222" - target: 443
published: 443
mode: host
- target: 2222
published: 2222
mode: host
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt" - "letsencrypt:/etc/letsencrypt"
@ -29,7 +34,6 @@ services:
deploy: deploy:
update_config: update_config:
failure_action: rollback failure_action: rollback
order: start-first
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.services.traefik.loadbalancer.server.port=web" - "traefik.http.services.traefik.loadbalancer.server.port=web"