-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d711f62
commit 071dfb4
Showing
2 changed files
with
11 additions
and
6 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,8 +1,13 @@ | ||
FROM node:20-alpine3.19 | ||
WORKDIR /app | ||
COPY package*.json . | ||
FROM node:20-alpine3.19 as base | ||
|
||
FROM base as builder | ||
WORKDIR /build | ||
COPY package*.json .npmrc ./ | ||
RUN npm ci --prefer-offline --no-audit | ||
COPY . . | ||
RUN npm run build | ||
RUN npm prune --include=prod | ||
RUN npm run build && npm prune --production | ||
|
||
FROM base | ||
WORKDIR /app | ||
COPY --from=builder /build ./ | ||
ENTRYPOINT ["node", "--enable-source-maps", "dist/main.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