summaryrefslogtreecommitdiff
path: root/frontend/Dockerfile
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-10-27 20:30:09 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-10-27 21:25:06 +0100
commit70026cebc0fd20b660cafe0bf95d0eea73459de2 (patch)
treefe8860bdfebfc01c386c72818b448d507e8a1dfc /frontend/Dockerfile
parent045a195366c03eb259669099a21adbf2c6754da1 (diff)
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.
Diffstat (limited to 'frontend/Dockerfile')
-rw-r--r--frontend/Dockerfile6
1 files changed, 4 insertions, 2 deletions
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 <opendc@atlarge-research.com>
-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