From d2a0c4d04497c81adde0690a680e9a8a582f79e5 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 19 Aug 2021 10:35:51 +0200 Subject: [PATCH] Fix default listen-ip in Docker configuration 127.0.0.1 will only work in host mode. Default to 0.0.0.0 instead. It can be manually overritten with actual container IP through MOBILIZON_INSTANCE_LISTEN_IP env parameter. Signed-off-by: Thomas Citharel --- config/docker.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/docker.exs b/config/docker.exs index dec3d28e..c2014142 100644 --- a/config/docker.exs +++ b/config/docker.exs @@ -2,7 +2,7 @@ import Config -listen_ip = System.get_env("MOBILIZON_INSTANCE_LISTEN_IP", "127.0.0.1") +listen_ip = System.get_env("MOBILIZON_INSTANCE_LISTEN_IP", "0.0.0.0") listen_ip = case listen_ip |> to_charlist() |> :inet.parse_address() do @@ -14,7 +14,7 @@ config :mobilizon, Mobilizon.Web.Endpoint, server: true, url: [host: System.get_env("MOBILIZON_INSTANCE_HOST", "mobilizon.lan")], http: [ - port: System.get_env("MOBILIZON_INSTANCE_PORT", "4000"), + port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_PORT", "4000")), ip: listen_ip ], secret_key_base: System.get_env("MOBILIZON_INSTANCE_SECRET_KEY_BASE", "changethis")