revite/Dockerfile

22 lines
443 B
Text
Raw Normal View History

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