* Apply hotfix changes (#1336) * Apply hotfix changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: updated config * fix: updated runtime config * fix: updated runtime config --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Apply hotfix changes * sonar permission related fix --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
19 lines
658 B
Bash
Executable File
19 lines
658 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script generates a runtime config file with environment variables
|
|
# It will be executed when the container starts
|
|
|
|
# Generate the runtime-config.js file with the current environment variables
|
|
cat > /usr/share/nginx/html/config/runtime-config.js << EOF
|
|
// This file is auto-generated at runtime. Do not modify manually.
|
|
window.RUNTIME_CONFIG = {
|
|
faviconPath: "${REACT_APP_FAVICON_PATH}",
|
|
logoUrl: "${REACT_APP_CUSTOM_LOGO_URL}"
|
|
};
|
|
EOF
|
|
|
|
# Make sure nginx can read the file
|
|
chmod 755 /usr/share/nginx/html/config/runtime-config.js
|
|
|
|
echo "Runtime configuration generated successfully with logo URL: ${REACT_APP_CUSTOM_LOGO_URL:-<not set>}"
|