diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-05 14:50:38 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-05 14:50:38 +0200 |
| commit | e8bb95cb35ed1b02a85cf7cbea5bfc20fe0324c2 (patch) | |
| tree | 1f3992d8045437774767556bf20d053b947ed164 /opendc-web/opendc-web-ui/public/index.html | |
| parent | 3c805a50ca710e123aa18ad1bfa01ea4f1ee40d2 (diff) | |
build: Support runtime variables in frontend Docker image
This change adds support for dynamically specifying various variables
for the frontend Docker image through environmental variables.
Previously, these were embedded directly into the source code, which
requires rebuilding the entire image to change these variables.
Diffstat (limited to 'opendc-web/opendc-web-ui/public/index.html')
| -rw-r--r-- | opendc-web/opendc-web-ui/public/index.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/opendc-web/opendc-web-ui/public/index.html b/opendc-web/opendc-web-ui/public/index.html index 44a0d80f..da734797 100644 --- a/opendc-web/opendc-web-ui/public/index.html +++ b/opendc-web/opendc-web-ui/public/index.html @@ -33,7 +33,7 @@ <meta property="og:locale" content="en_US"> <!-- Google meta tags --> - <meta name="google-signin-client_id" content="%REACT_APP_OAUTH_CLIENT_ID%"> + <meta name="google-signin-client_id" content="$OAUTH_CLIENT_ID"> <meta name="google-site-verification" content="YIR4LkQTv6WmOdWv8MkeiUKni-0Yu3WHylLp4VvUMig"/> <!-- CDN dependencies --> @@ -52,6 +52,13 @@ gtag('js', new Date()) gtag('config', 'UA-84285092-3') </script> + <script> + window.$$env = { + API_BASE_URL: "$API_BASE_URL", + OAUTH_CLIENT_ID: "$OAUTH_CLIENT_ID", + SENTRY_DSN: "$SENTRY_DSN", + }; + </script> </head> <body> <noscript> |
