forked from yuezk/chatgpt-mirror
-
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.
Merge pull request yuezk#24 from krw901/pr
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM node:18-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
COPY pnpm-lock.yaml ./ | ||
RUN corepack enable --install-directory=/usr/bin \ | ||
&& corepack prepare --activate pnpm@latest | ||
RUN pnpm install --frozen-lockfile | ||
COPY . . | ||
RUN pnpm run build | ||
RUN rm -rf node_modules | ||
RUN pnpm install --frozen-lockfile --prod | ||
|
||
# runtime image | ||
FROM node:18-alpine | ||
|
||
ENV TZ="Asia/Shanghai" | ||
|
||
WORKDIR /app | ||
COPY package.json . | ||
COPY public /app/public | ||
COPY --from=0 /app/node_modules /app/node_modules | ||
COPY --from=0 /app/dist /app/dist | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["npm", "run", "start:prod"] |