diff --git a/Dockerfile-mergefront b/Dockerfile-mergefront new file mode 100644 index 0000000..cb36fb2 --- /dev/null +++ b/Dockerfile-mergefront @@ -0,0 +1,19 @@ +FROM node:16 as builder +ARG VITE_API_URL +ARG VITE_KEYCLOAK_CLIENT_ID +ARG VITE_KEYCLOAK_CLIENT_SECRET +ARG VITE_KEYCLOAK_URL +WORKDIR /usr/src/postamates_frontend +ENV NODE_OPTIONS=--max_old_space_size=4096 +COPY package*.json ./ +COPY yarn.lock ./ +RUN yarn install +COPY . . +RUN yarn build + +FROM scratch AS host-export +COPY --from=builder /usr/src/postamates_frontend/dist . +# first create dist directory to avoid overstrict permissions +# mkdir ../dist +# then compile the result into that directory using buildkit +# DOCKER_BUILDKIT=1 docker build --file Dockerfile-mergefront --output ../dist .