Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
yzh990918 committed Mar 30, 2023
1 parent da75284 commit 2bfdbfb
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,39 @@ A demo repo based on [OpenAI GPT-3.5 Turbo API.](https://platform.openai.com/doc

### Deploy with Docker

Environment variables refer to the documentation below. [Docker Hub address](https://hub.docker.com/r/ddiu8081/chatgpt-demo).

**Direct run**
```bash
docker run -e OPENAI_API_KEY=sk-xxx -p 3000:3000 ddiu8081/chatgpt-demo
```

**Docker compose**
```yml
version: '3'

services:
app:
image: ddiu8081/chatgpt-demo
ports:
- 3000:3000
environment:
OPENAI_API_KEY:
HTTPS_PROXY:
OPENAI_API_BASE_URL:
HEAD_SCRIPTS:
SECRET_KEY:
SITE_PASSWORD:
OPENAI_API_MODEL:
```

```bash
# start
docker compose up -d
# down
docker-compose down
```

### Deploy on more servers

Please refer to the official deployment documentation:https://docs.astro.build/en/guides/deploy
Expand Down
34 changes: 28 additions & 6 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,36 @@
![image](https://cdn.staticaly.com/gh/yzh990918/static@master/20230310/image.e0n7c0zaen4.webp)

### 部署在 Docker
在部署应用之前,请确保 `.env` 配置正常。
环境变量参考下方文档, [Docker Hub address](https://hub.docker.com/r/ddiu8081/chatgpt-demo).

**一键运行**
```bash
# build
docker-compose build .
# run
docker-compose up -d
# stop
docker run -e OPENAI_API_KEY=sk-xxx -p 3000:3000 ddiu8081/chatgpt-demo
```

**使用 Docker compose**
```yml
version: '3'

services:
app:
image: ddiu8081/chatgpt-demo
ports:
- 3000:3000
environment:
OPENAI_API_KEY:
HTTPS_PROXY:
OPENAI_API_BASE_URL:
HEAD_SCRIPTS:
SECRET_KEY:
SITE_PASSWORD:
OPENAI_API_MODEL:
```

```bash
# start
docker compose up -d
# down
docker-compose down
```

Expand Down

0 comments on commit 2bfdbfb

Please sign in to comment.