From 70026cebc0fd20b660cafe0bf95d0eea73459de2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 27 Oct 2020 20:30:09 +0100 Subject: Propagate user-specified API url to React build This change fixes an issue where we did not forward the environmental variable for controlling the API url to the React build. --- frontend/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'frontend/Dockerfile') diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 36e3c20b..113b09c9 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,7 +1,8 @@ FROM node:14 MAINTAINER OpenDC Maintainers -ARG REACT_APP_OAUTH_CLIENT_ID +ARG OPENDC_OAUTH_CLIENT_ID +ARG OPENDC_API_BASE_URL # Copy OpenDC directory COPY ./ /opendc @@ -10,7 +11,8 @@ COPY ./ /opendc RUN cd /opendc/ \ && rm -rf ./build \ && yarn \ - && export REACT_APP_OAUTH_CLIENT_ID=$REACT_APP_OAUTH_CLIENT_ID \ + && export REACT_APP_OAUTH_CLIENT_ID=$OPENDC_OAUTH_CLIENT_ID \ + && export REACT_APP_API_BASE_URL=$OPENDC_API_BASE_URL \ && yarn build # Setup nginx to serve the frontend -- cgit v1.2.3