Skip to content

Commit

Permalink
replace yarn with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
pluja committed Oct 27, 2023
1 parent 5570a74 commit 3c66c61
Show file tree
Hide file tree
Showing 3 changed files with 2,077 additions and 1,820 deletions.
25 changes: 14 additions & 11 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
FROM node:alpine as build

FROM node:alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
COPY . .
RUN yarn
ENV BODY_SIZE_LIMIT=0
RUN yarn build
RUN ls -al

FROM node:alpine as production
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
ENV BODY_SIZE_LIMIT=0
RUN pnpm run build

FROM base
WORKDIR /app
COPY --from=build /app/package.json ./
COPY --from=build /app/build/ ./
RUN yarn --production
ENV BODY_SIZE_LIMIT=0
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/build ./
EXPOSE 3000
CMD [ "node", "index.js"]
Loading

0 comments on commit 3c66c61

Please sign in to comment.