mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
feat: update Dockerfile for pnpm support, enable registry switching, and remove unused packages
This commit is contained in:
parent
74add79c8f
commit
3069b5cfc3
4
.npmrc
Normal file
4
.npmrc
Normal file
@ -0,0 +1,4 @@
|
||||
# if you located in China, you can use taobao registry to speed up.
|
||||
# You can also specify your own private npm registry, which will be effective in local development, deployment, and Docker environments.
|
||||
|
||||
# registry=https://registry.npmmirror.com/
|
18
Dockerfile
18
Dockerfile
@ -1,20 +1,20 @@
|
||||
FROM node:18-alpine AS base
|
||||
FROM node:20-alpine AS base
|
||||
|
||||
# if you located in China, you can use taobao registry to speed up
|
||||
# RUN npm config set registry 'https://registry.npmmirror.com/'
|
||||
|
||||
RUN npm install -g pnpm@latest-9
|
||||
|
||||
FROM base AS deps
|
||||
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY .npmrc package.json pnpm-lock.yaml ./
|
||||
|
||||
RUN yarn config set registry 'https://registry.npmmirror.com/'
|
||||
RUN yarn install
|
||||
RUN pnpm install
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
RUN apk update && apk add --no-cache git
|
||||
|
||||
ENV OPENAI_API_KEY=""
|
||||
ENV GOOGLE_API_KEY=""
|
||||
ENV CODE=""
|
||||
@ -23,7 +23,7 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
RUN yarn build
|
||||
RUN pnpm build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
Loading…
Reference in New Issue
Block a user