From d2e0c97aea03a84c4a5e04efcc0f77dcf9dc12a6 Mon Sep 17 00:00:00 2001 From: kevkevin Date: Thu, 27 Apr 2023 14:28:26 -0500 Subject: [PATCH] build: added env var that should work --- Dockerfile | 4 ++++ src/constants/index.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c11e92001..be1c87ce0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,10 @@ RUN yarn cache clean && yarn install --ignore-scripts COPY . /usr/src/app +ARG REACT_APP_API_URL + +ENV REACT_APP_API_URL $REACT_APP_API_URL + RUN yarn run build FROM nginx:alpine diff --git a/src/constants/index.ts b/src/constants/index.ts index 64be210f3..fd28574d0 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -7,7 +7,7 @@ export const isDevelopment = !!( ); export const API_URL = - process.env.REACT_DEV_API_URL || + process.env.REACT_APP_API_URL || apiUrlFromSwarmHost() || "https://knowledge-graph.sphinx.chat";