From ae27d4ab05396727140c9c79eaa898cee1225514 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Fri, 14 Feb 2020 14:25:27 +0100 Subject: [PATCH] Make theia hostname configurable (#626) The hostname on which Theia starts is now configurable through THEIA_HOST env var with the default of 0.0.0.0 to preserve the original behavior. --- dockerfiles/theia/src/entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dockerfiles/theia/src/entrypoint.sh b/dockerfiles/theia/src/entrypoint.sh index 165c52750..d344b0e9c 100755 --- a/dockerfiles/theia/src/entrypoint.sh +++ b/dockerfiles/theia/src/entrypoint.sh @@ -51,6 +51,10 @@ else fi fi +if [ -z "$THEIA_HOST" ]; then + THEIA_HOST="0.0.0.0" +fi + # SITTERM / SIGINT responsible_shutdown() { echo "" @@ -77,7 +81,7 @@ fi shopt -u nocasematch # run Che Theia -node src-gen/backend/main.js /projects --hostname=0.0.0.0 --port=${THEIA_PORT} & +node src-gen/backend/main.js /projects --hostname=${THEIA_HOST} --port=${THEIA_PORT} & PID=$!