ChatGPT-Next-Web/docker-README.md
2023-04-05 00:28:39 +08:00

50 lines
805 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 使用docker运行ChatGPT Next Web
```bash
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY="" \
-e CODE="" \
--name chatgpt_next_web \
yidadaa/chatgpt-next-web
```
## 更新ChatGPT Next Web
从dockerhub更新ChatGPT Next Web
```bash
docker pull yidadaa/chatgpt-next-web
```
## 本地构建ChatGPT Next Web
如何使用docker在本地构建ChatGPT Next Web的镜像
### 普通构建
```bash
docker build -t yidadaa/chatgpt-next-web .
```
### 参数级构建
```bash
docker build -t yidadaa/chatgpt-next-web \
--build-arg OPENAI_API_KEY=$(OPENAI_API_KEY) \
--build-arg CODE=$(CODE) \
.
```
## 使用docker compose构建
```bash
docker compose build
```
## 使用docker composey运行
修改`docker-compose.env`的环境变量,再执行
```bash
docker compose up -d
```