-
Notifications
You must be signed in to change notification settings - Fork 18
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
0532d15
commit 435ad22
Showing
4 changed files
with
41 additions
and
15 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,31 @@ | ||
FROM node:20 as base | ||
|
||
WORKDIR /usr/src/app | ||
ADD . . | ||
|
||
ARG REDIS_URL | ||
ENV REDIS_URL=$REDIS_URL | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable pnpm | ||
RUN corepack use pnpm@9 | ||
|
||
RUN pnpm build | ||
|
||
FROM node:20 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY --from=base /usr/src/app/app/package.json /usr/src/app/package.json | ||
COPY --from=base /usr/src/app/app/dist /usr/src/app/dist | ||
|
||
ENV NODE_ENV=production | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable pnpm | ||
RUN corepack use pnpm@9 | ||
|
||
USER node | ||
CMD [ "node", "/usr/src/app/dist/worker.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
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