From 84521ec8a94bff014cb32357e83c89f915d369a9 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 23 Aug 2023 18:04:32 +0200 Subject: [PATCH] use host ports for traefik which allows to see the real client's IP --- ansible/roles/traefik/docker-stack.yml.j2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ansible/roles/traefik/docker-stack.yml.j2 b/ansible/roles/traefik/docker-stack.yml.j2 index 7761c6b..95e8b60 100644 --- a/ansible/roles/traefik/docker-stack.yml.j2 +++ b/ansible/roles/traefik/docker-stack.yml.j2 @@ -23,9 +23,18 @@ services: networks: - traefik ports: - - 443:443 - - 80:80 - - 444:444 + - mode: host + protocol: tcp + published: 443 + target: 443 + - mode: host + protocol: tcp + published: 80 + target: 80 + - mode: host + protocol: tcp + published: 444 + target: 444 deploy: placement: constraints: