diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 00000000..db69b4b2 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,2 @@ +distiller/build +distiller/node_modules \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile index ef3b2e47..284f5ccb 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,8 +1,15 @@ FROM node:18.6.0 as build -COPY ./distiller /distiller + +WORKDIR /distiller + +COPY ./distiller/package.json ./ +COPY ./distiller/package-lock.json ./ +RUN yarn + +COPY ./distiller . ARG REACT_APP_API_URL ARG REACT_APP_SENTRY_DSN_URL -RUN cd /distiller && yarn && REACT_APP_API_URL=$REACT_APP_API_URL REACT_APP_SENTRY_DSN_URL=$REACT_APP_SENTRY_DSN_URL yarn build +RUN REACT_APP_API_URL=$REACT_APP_API_URL REACT_APP_SENTRY_DSN_URL=$REACT_APP_SENTRY_DSN_URL yarn build FROM nginx COPY --from=build /distiller/build/ /usr/share/nginx/html