-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7a957f
commit 8387e7a
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const parseBoolean = (value) => ["true", "1", "yes"].includes((value || "").toLocaleLowerCase()); | ||
|
||
const siteConfig = { | ||
CLIENT_NAME: process.env.CLIENT_NAME || null, | ||
PORTAL_URL: process.env.BENTO_PUBLIC_PORTAL_URL || null, | ||
TRANSLATED: parseBoolean(process.env.BENTO_PUBLIC_TRANSLATED), | ||
BEACON_URL: process.env.BEACON_URL || null, | ||
BEACON_UI_ENABLED: parseBoolean(process.env.BENTO_BEACON_UI_ENABLED), | ||
|
||
// Authentication | ||
BENTO_PUBLIC_URL: process.env.BENTO_PUBLIC_URL || null, | ||
CLIENT_ID: process.env.CLIENT_ID || null, | ||
OPENID_CONFIG_URL: process.env.OPENID_CONFIG_URL || null, | ||
}; | ||
|
||
if (typeof require !== "undefined" && require.main === module) { | ||
process.stdout.write(`BENTO_PUBLIC_CONFIG = ${JSON.stringify(siteConfig, null, 2)};\n`); | ||
} | ||
|
||
module.exports = { | ||
siteConfig, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
CONFIG_FILE="www/public/config.js" | ||
|
||
echo "[bento_public] [entrypoint] writing ${CONFIG_FILE}" | ||
node ./create_config_prod.js # Echo out to logs | ||
node ./create_config_prod.js > "${CONFIG_FILE}" | ||
|
||
echo "[bento_public] [entrypoint] starting web server" | ||
./reactapp |