Configuration
The following environment variables are used to configure the application.
Generally, they are set via a Kubernetes ConfigMap with values coming from the Helm values.yaml. See Deployment to Kubernetes
Environment variable |
Description |
Required/optional in the application |
Corresponding Helm value |
Required/optional in the Helm chart |
|---|---|---|---|---|
BACKEND_URL |
A URL that points to a running ODT back-end (ska-oso-services), without the full API path (e.g. |
Required |
|
Optional - will fall back on: |
BASE_URL |
The path the application should be available on the host, i.e. what to visit in the browser |
Required |
|
Required - default |
These variables are set when the application is deployed rather than when it is built to allow the deployment
in different Kubernetes environments without the need to rebuild the application. The variables are set by
the scripts/write_env_js.sh script which writes them to env.js file that is read by the application at
runtime. The script is executed when the ODT UI docker image is started. This script is also used for local deployment
as part of yarn start command (run in the make set-dev-env-vars target).
Additionally when deploying the pod to Kubernetes, the script scripts/set_absolute_paths.sh is run when
the container starts to replace any relative path references in the index.html file with the full BASE_URL.