From f3f67ce20456e6632c432d3903d9d0f4d790f477 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Mon, 14 Mar 2022 18:59:20 +0100 Subject: [PATCH] fixed bug in entrypoint.sh * use "hostname -I" instead of "hostname -i", as no DNS resolution is required * "hostname -I" might return multiple IPs (as space delimited string). Use the first one ("best effort") per default. In case a different IP should be used for the swagger UI API resource, the "SWAGGER_IP" env variable must be set in the docker-compose.yml. see #230 --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a1c2601..0f03f77 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,7 +29,7 @@ service supervisor start supervisorctl start all fi -export HOST_IP=$(hostname -i) +export HOST_IP=$(hostname -I | awk '{print $1}') # Start API as signal-api user exec setpriv --reuid=${SIGNAL_CLI_UID} --regid=${SIGNAL_CLI_GID} --init-groups --inh-caps=$caps signal-cli-rest-api -signal-cli-config=${SIGNAL_CLI_CONFIG_DIR}