修正
This commit is contained in:
@@ -6,7 +6,9 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
# 安装依赖
|
||||
RUN npm ci
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN npm cache clean --force
|
||||
RUN npm install
|
||||
|
||||
# 复制所有源代码
|
||||
COPY . .
|
||||
@@ -27,7 +29,9 @@ COPY --from=builder /app/server /app/server
|
||||
COPY --from=builder /app/package*.json /app/
|
||||
|
||||
# 只安装生产环境依赖
|
||||
RUN npm ci --only=production
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN npm cache clean --force
|
||||
RUN npm install --only=production
|
||||
|
||||
# 设置环境变量
|
||||
ENV PORT=3010
|
||||
|
||||
Reference in New Issue
Block a user