2021-12-20 15:48:27 -05:00
|
|
|
FROM node:16-buster AS builder
|
2021-08-30 10:24:15 -04:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY . .
|
|
|
|
COPY .env.build .env
|
2022-04-29 11:17:31 -04:00
|
|
|
|
2022-09-19 09:40:53 -04:00
|
|
|
RUN corepack prepare pnpm --activate
|
|
|
|
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
|
2022-09-19 09:40:53 -04:00
|
|
|
RUN pnpm install --prod
|
2021-08-30 10:24:15 -04:00
|
|
|
|
2022-04-29 11:17:31 -04:00
|
|
|
FROM node:16-alpine
|
2021-08-30 10:24:15 -04:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY --from=builder /usr/src/app .
|
|
|
|
|
|
|
|
EXPOSE 5000
|
2022-09-19 09:24:04 -04:00
|
|
|
CMD [ "pnpm", "start:inject" ]
|