-
Notifications
You must be signed in to change notification settings - Fork 4
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
edaf2c7
commit b6670f7
Showing
8 changed files
with
9,872 additions
and
25,945 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 @@ | ||
shamefully-hoist=true |
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,27 +1,23 @@ | ||
FROM node:16-alpine as development | ||
FROM node:20-alpine AS base | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
ENV HUSKY=0 | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
# Install app dependencies | ||
# A wildcard is used to ensure both package.json AND package-lock.json are copied | ||
# where available (npm@5+) | ||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM node:16-alpine as production | ||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
RUN npm install --only=production | ||
FROM base AS build | ||
WORKDIR /app | ||
COPY .npmrc pnpm-lock.yaml package.json ./ | ||
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc pnpm install --frozen-lockfile | ||
COPY . . | ||
RUN pnpm build | ||
|
||
COPY --from=development /usr/src/app/dist ./dist | ||
FROM base AS prod | ||
WORKDIR /app | ||
ENV NODE_ENV=production | ||
COPY .npmrc pnpm-lock.yaml package.json Procfile nest-cli.json ./ | ||
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc pnpm install --frozen-lockfile --prod | ||
COPY --from=build /app/dist ./dist | ||
|
||
CMD [ "npm", "run" , "start:prod" ] | ||
EXPOSE 3000 | ||
CMD ["pnpm", "start:prod"] |
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
Oops, something went wrong.