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:31:11 -04:00
|
|
|
RUN corepack pnpm install
|
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
|
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" ]
|