From b176d931eebaa710c6ae1c4f58b6d3426d6bf2b4 Mon Sep 17 00:00:00 2001 From: bindeali <56399637+bindeali@users.noreply.github.com> Date: Sun, 30 Jul 2023 20:18:13 +0200 Subject: [PATCH] Dockerfile env fix --- Dockerfile | 16 +++++++++++++++- Dockerfile-standalone | 15 --------------- 2 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 Dockerfile-standalone diff --git a/Dockerfile b/Dockerfile index 8bd99d46..d878bf5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,21 @@ FROM node:18 as node ARG PUBLIC_PATH=. -ENV PUBLIC_URL=${PUBLIC_PATH} +ENV PUBLIC_URL=$PUBLIC_PATH +ARG REACT_APP_CONTEXT +ENV REACT_APP_CONTEXT=$REACT_APP_CONTEXT +ARG REACT_APP_ID +ENV REACT_APP_ID=$REACT_APP_ID +ARG REACT_APP_URL +ENV REACT_APP_URL=$REACT_APP_URL +ARG REACT_APP_COMPONENTS +ENV REACT_APP_COMPONENTS=$REACT_APP_COMPONENTS +ARG REACT_APP_DEBUG +ENV REACT_APP_DEBUG=$REACT_APP_DEBUG +ARG REACT_APP_AUTHENTICATION +ENV REACT_APP_AUTHENTICATION=$REACT_APP_AUTHENTICATION +ARG REACT_APP_STANDALONE +ENV REACT_APP_STANDALONE=$REACT_APP_STANDALONE WORKDIR /ontographer COPY package.json . diff --git a/Dockerfile-standalone b/Dockerfile-standalone deleted file mode 100644 index 8bd99d46..00000000 --- a/Dockerfile-standalone +++ /dev/null @@ -1,15 +0,0 @@ -FROM node:18 as node - -ARG PUBLIC_PATH=. -ENV PUBLIC_URL=${PUBLIC_PATH} - -WORKDIR /ontographer -COPY package.json . -COPY package-lock.json . -RUN npm install --production -COPY . . -RUN npx eslint --ext .ts,.tsx ./src/ -RUN npm run build - -FROM nginx:latest -COPY --from=node /ontographer/build /usr/share/nginx/html