old-automod/web/Dockerfile

19 lines
557 B
Docker
Raw Normal View History

FROM node:16 as build
ARG VITE_API_URL
ARG VITE_BOT_PREFIX
WORKDIR /build/
2022-07-09 05:18:03 +00:00
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn ./.yarn
RUN yarn install --immutable
COPY . .
RUN yarn build
FROM node:16 as prod
WORKDIR /app/
2022-07-09 05:18:03 +00:00
COPY --from=build /build/package.json /build/yarn.lock /build/.yarnrc.yml ./
COPY --from=build /build/.yarn ./.yarn
COPY --from=build /build/dist ./dist
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"]