From 5b28763bcc604b640e0967754e6e0051e7d7a1f1 Mon Sep 17 00:00:00 2001 From: Gernot Schulz Date: Mon, 12 Jul 2021 11:36:11 +0200 Subject: [PATCH] Docker: Bind to 0.0.0.0 for Docker Swarm Swarm uses a cluster-wide ingress network and does not permit binding ports to localhost. It simply ignores such a binding and prints a warning instead. This patch fixes this recent regression to avoid the warning. --- docker/docker-stack.yml.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-stack.yml.m4 b/docker/docker-stack.yml.m4 index c20164ecb..a7fd7d649 100644 --- a/docker/docker-stack.yml.m4 +++ b/docker/docker-stack.yml.m4 @@ -125,8 +125,8 @@ services: - front - back ports: - ifelse(EXTERNAL_HTTP_PORT,,,- "127.0.0.1:EXTERNAL_HTTP_PORT:8000") - ifelse(EXTERNAL_HTTPS_PORT,,,- "127.0.0.1:EXTERNAL_HTTPS_PORT:8001") + ifelse(EXTERNAL_HTTP_PORT,,,- "0.0.0.0:EXTERNAL_HTTP_PORT:8000") + ifelse(EXTERNAL_HTTPS_PORT,,,- "0.0.0.0:EXTERNAL_HTTPS_PORT:8001") deploy: restart_policy: condition: on-failure