-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
2,077 additions
and
1,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.