From e8bb95cb35ed1b02a85cf7cbea5bfc20fe0324c2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 5 May 2021 14:50:38 +0200 Subject: 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. --- opendc-web/opendc-web-ui/src/api/routes/token-signin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-ui/src/api/routes') diff --git a/opendc-web/opendc-web-ui/src/api/routes/token-signin.js b/opendc-web/opendc-web-ui/src/api/routes/token-signin.js index d6cff570..e40127f2 100644 --- a/opendc-web/opendc-web-ui/src/api/routes/token-signin.js +++ b/opendc-web/opendc-web-ui/src/api/routes/token-signin.js @@ -1,5 +1,5 @@ export function performTokenSignIn(token) { - const apiUrl = process.env.REACT_APP_API_BASE_URL || '' + const apiUrl = window.$$env['API_BASE_URL'] || '' return fetch(`${apiUrl}/tokensignin`, { method: 'POST', -- cgit v1.2.3