1
0
mirror of synced 2026-01-01 00:02:54 -05:00
Files
airbyte/airbyte-webapp/docs/HowTo-EnvVariables.md
2022-09-01 15:16:30 +02:00

29 lines
793 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Environment variables
Currently we have 2 types of environment variables:
1. Statically injected build time variables
2. Dynamic env variables injected via `window`
### Static env variables
The environment variables are embedded during the build time. Since our app is based on Create React App that produces a
static HTML/CSS/JS bundle, it cant possibly read them at runtime.
Static env variables name should always start with `REACT_APP_`
### Dynamic env variables
Dynamic env variables in our cases are injected into app by nginx
```html
<script language="javascript" \>
window.TRACKING_STRATEGY = "$TRACKING_STRATEGY";
window.AIRBYTE_VERSION = "$AIRBYTE_VERSION";
window.API_URL = "$API_URL";
</script>
;
```
later we can use any of the declared variables from window