revite/Dockerfile

19 lines
390 B
Text
Raw Normal View History

FROM node:16-buster AS builder
WORKDIR /usr/src/app
COPY . .
COPY .env.build .env
2022-09-19 08:14:36 -04:00
RUN pnpm install --frozen-lockfile
RUN pnpm typecheck
2022-09-19 09:01:38 -04:00
RUN NODE_OPTIONS='--max-old-space-size=4096' pnpm build:all
RUN find . -name "node_modules" -type d -prune
2022-09-19 08:14:36 -04:00
RUN pnpm install --prod
FROM node:16-alpine
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app .
EXPOSE 5000
CMD [ "yarn", "start:inject" ]