From 1afba78d363365f62246e7ec7d2778b5557d2558 Mon Sep 17 00:00:00 2001 From: Josua Amann Date: Thu, 23 Nov 2017 17:33:39 +0100 Subject: [PATCH] support public-URL, other than "http://localhost:8080" (cherry picked from commit 039a16f) --- .env.template | 1 + README.md | 4 +++- ui-react/src/config/flightboard.config.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index c770d18..4d4874c 100644 --- a/.env.template +++ b/.env.template @@ -2,3 +2,4 @@ export USERNAME= export PASSWORD= export DOMAIN= export PORT= +export PUBLIC_URL= diff --git a/README.md b/README.md index ed581a9..6e71c98 100644 --- a/README.md +++ b/README.md @@ -153,12 +153,14 @@ There are three main directories in the `ui-react/src/` folder: }; ``` -* Alternatively, username, password and domain can be set as environment variable +* Alternatively, username, password and domain and public-URL can be set as environment variable. Keep in mind that if + a public-URL has been provided, this environment variable already has to be set during the build-lifecycle ```bash export USERNAME=svcacct_email@domain.com export PASSWORD=password export DOMAIN=domain.com + export PUBLIC_URL=http://meet-easier.domain.com ``` * In `/ui-react/src/config/flightboard.config.js`, manage your customizations: diff --git a/ui-react/src/config/flightboard.config.js b/ui-react/src/config/flightboard.config.js index 2124866..e02ed7a 100644 --- a/ui-react/src/config/flightboard.config.js +++ b/ui-react/src/config/flightboard.config.js @@ -18,6 +18,6 @@ module.exports = { }, 'socket' : { - 'endpoint' : 'http://localhost:8080', + 'endpoint' : `${process.env.PUBLIC_URL || 'http://localhost:8080'}`, } };