-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch js-pipelines branch in pr workflow
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM node:20.10.0-bookworm AS base | ||
WORKDIR /app | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
RUN npm install -g [email protected] | ||
|
||
# # # PROJECT | ||
FROM base as project | ||
COPY . . | ||
|
||
# # # PROD DEPENDENCIES | ||
FROM project AS prod-dependencies | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile --ignore-scripts | ||
|
||
# # # BUILDER | ||
FROM project AS builder | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --ignore-scripts | ||
|
||
ARG NEXT_PUBLIC_BUGSNAG_API_KEY | ||
|
||
RUN pnpm build | ||
|
||
# # # RUNNER | ||
FROM base AS runner | ||
COPY --from=prod-dependencies /app/node_modules /app/node_modules | ||
|
||
COPY --from=builder /app/.next/standalone/ /app/.next/standalone | ||
COPY --from=builder /app/.next/static /app/.next/standalone/.next/static | ||
COPY --from=builder /app/public /app/.next/standalone/public | ||
|
||
CMD ["node", ".next/standalone/server.js"] |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
"name": "js-react-example", | ||
"version": "0.1.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": "20.10.0" | ||
}, | ||
|