leonsimon23 commited on
Commit
994e972
·
verified ·
1 Parent(s): 3d34bc1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -1,10 +1,20 @@
1
  FROM node:18
2
 
3
  RUN git clone https://github.com/SciYied/ChatGPT-Next-Web.git
4
- WORKDIR /ChatGPT-Next-Web
5
 
6
- RUN npm install
7
  RUN npm run build
8
 
 
 
 
 
 
 
 
 
9
  EXPOSE 3000
10
- CMD ["node", ".next/standalone/server.js"]
 
 
 
1
  FROM node:18
2
 
3
  RUN git clone https://github.com/SciYied/ChatGPT-Next-Web.git
4
+ WORKDIR "ChatGPT-Next-Web"
5
 
6
+ RUN npm i
7
  RUN npm run build
8
 
9
+ # 复制 standalone 输出文件到一个新目录
10
+ RUN cp -r .next/standalone ./standalone
11
+ RUN cp -r .next/static ./standalone/.next/static
12
+ RUN cp -r public ./standalone/public
13
+
14
+ # 切换工作目录
15
+ WORKDIR /ChatGPT-Next-Web/standalone
16
+
17
  EXPOSE 3000
18
+
19
+ # 修改启动命令
20
+ CMD ["node", "server.js"]