title: 利用API部署自己的AGI tags: [] id: '2610' categories:
简单记录一下chatgpt-demo这个项目的部署过程。
# ---- Dependencies ----
FROM node:19.7.0
WORKDIR /app
COPY chatgpt-demo /app
RUN npm config set registry https://registry.npmmirror.com \
&& npm install \
&& rm ./src/pages/api/generate.ts
ENV PORT=3000
CMD ["npm", "run", "dev", "--", "--port", "3000", "--host", "0.0.0.0"]
version: '3.3'
services:
chatgpt:
container_name: chatgpt
restart: always
image: limour/chatgpt
ports:
- '6903:3000'
volumes:
- ./.env:/app/.env
- ./generate.ts:/app/src/pages/api/generate.ts