Spaces:
Runtime error
Runtime error
FROM node:18 | |
RUN git clone https://github.com/SciYied/ChatGPT-Next-Web.git | |
WORKDIR "ChatGPT-Next-Web" | |
RUN npm i | |
RUN npm run build | |
# 复制 standalone 输出文件到一个新目录 | |
RUN cp -r .next/standalone ./standalone | |
RUN cp -r .next/static ./standalone/.next/static | |
RUN cp -r public ./standalone/public | |
# 切换工作目录 | |
WORKDIR /ChatGPT-Next-Web/standalone | |
EXPOSE 3000 | |
# 设置环境变量,让 Next.js 监听所有网络接口 | |
ENV HOSTNAME "0.0.0.0" | |
ENV PORT 3000 | |
# 修改启动命令 | |
CMD ["node", "server.js"] |