old-automod/web/Dockerfile

23 lines
697 B
Docker
Raw Normal View History

FROM node:16 as build
ARG VITE_API_URL
ARG VITE_BOT_PREFIX
2022-07-12 16:07:17 +00:00
WORKDIR /build/app
COPY web/package.json web/yarn.lock web/.yarnrc.yml ./
COPY web/.yarn ./.yarn
COPY lib ../lib
2022-07-15 16:03:51 +00:00
RUN yarn --cwd ../lib --immutable
2022-07-15 15:57:40 +00:00
RUN yarn --cwd ../lib build
2022-07-09 05:18:03 +00:00
RUN yarn install --immutable
2022-07-12 16:07:17 +00:00
COPY web .
RUN yarn build
FROM node:16 as prod
2022-07-12 16:07:17 +00:00
WORKDIR /app/web
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist
COPY ./lib ../lib
2022-07-09 05:18:03 +00:00
RUN yarn add vite
# Running this with bash -c because it won't exit on ctrl+c otherwise
CMD ["bash", "-c", "yarn preview --port=80 --strictPort=true --clearScreen=false --host"]