Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Dec 16, 2023
1 parent 8c6eb2c commit acff8c8
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM node:20-slim as BUILD
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app

COPY . .
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build

FROM node:20.10.0-alpine

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
EXPOSE 3000

WORKDIR /app

COPY --from=BUILD /app/ .

ENTRYPOINT ["pnpm", "run", "start"]
CMD [ "pnpm", "start" ]

0 comments on commit acff8c8

Please sign in to comment.