github-actions[bot] commited on
Commit
e2f5438
·
1 Parent(s): f918861

Sync from GitHub Viciy2023/Qwen2API-A@1942c6815371fa4038b2a6db68e511f58a756cf4

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. docker/Dockerfile +2 -1
Dockerfile CHANGED
@@ -3,6 +3,7 @@ FROM node:lts-alpine
3
  ENV NODE_ENV=production
4
  ENV SERVICE_PORT=7860
5
  ENV LISTEN_ADDRESS=0.0.0.0
 
6
 
7
  RUN apk add --no-cache python3 py3-pip
8
 
@@ -23,7 +24,7 @@ RUN npm install
23
  COPY . .
24
 
25
  # 构建前端应用
26
- RUN cd public && npm install && npm run build
27
 
28
  # 删除前端不必要文件
29
  RUN rm -rf public/src public/node_modules public/package*.json
 
3
  ENV NODE_ENV=production
4
  ENV SERVICE_PORT=7860
5
  ENV LISTEN_ADDRESS=0.0.0.0
6
+ ENV NPM_CONFIG_PRODUCTION=false
7
 
8
  RUN apk add --no-cache python3 py3-pip
9
 
 
24
  COPY . .
25
 
26
  # 构建前端应用
27
+ RUN cd public && npm install --include=dev && npm run build
28
 
29
  # 删除前端不必要文件
30
  RUN rm -rf public/src public/node_modules public/package*.json
docker/Dockerfile CHANGED
@@ -3,6 +3,7 @@ FROM node:lts-alpine
3
  ENV NODE_ENV=production
4
  ENV SERVICE_PORT=7860
5
  ENV LISTEN_ADDRESS=0.0.0.0
 
6
 
7
  RUN apk add --no-cache python3 py3-pip
8
 
@@ -23,7 +24,7 @@ RUN npm install
23
  COPY . .
24
 
25
  # 构建前端应用
26
- RUN cd public && npm install && npm run build
27
 
28
  # 删除前端不必要文件
29
  RUN rm -rf public/src public/node_modules public/package*.json
 
3
  ENV NODE_ENV=production
4
  ENV SERVICE_PORT=7860
5
  ENV LISTEN_ADDRESS=0.0.0.0
6
+ ENV NPM_CONFIG_PRODUCTION=false
7
 
8
  RUN apk add --no-cache python3 py3-pip
9
 
 
24
  COPY . .
25
 
26
  # 构建前端应用
27
+ RUN cd public && npm install --include=dev && npm run build
28
 
29
  # 删除前端不必要文件
30
  RUN rm -rf public/src public/node_modules public/package*.json