Skip to content

Commit

Permalink
Merge pull request #166 from YuMingC233/deploy_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Nov 9, 2023
2 parents 34a7be2 + a495581 commit 220cf2a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ After cloning the repo, go to [OpenAI](https://beta.openai.com/account/api-keys)

Then, run the application in the command line and it will be available at `http://localhost:3000`.

[specific running procedure is described in this document - Chinese version](./deploy-ch.md)

```bash
npm run dev
```
Expand All @@ -54,7 +56,6 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu

Setup the env variables, by following the `./example.env` file.


## Support Docker

https://github.com/JimmyLv/BibiGPT/pull/133
Expand Down
26 changes: 26 additions & 0 deletions deploy-ch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## 环境要求

nodejs 18.0 +

## 操作指引

1. clone 本仓库
2. 运行 `npm install`
3. 复制 [.example.env](.example.env) 到同级目录,并将其改名为 `.env`
4. 填写 `.env` 文件中所有的必填项 (也就是除了 Optional 下的所有内容)
1.https://platform.openai.com/account/api-keys 生成 key,复制它并赋值到 OPENAI_API_KEY
2.https://www.bilibili.com 中使用 F12 打开开发者控制台,导航至 application -> Cookies -> ...www.bilibili.com -> **SESSDATA**,复制该值并赋值到 `BILIBILI_SESSION_TOKEN`
![img_1.png](public/deploy-ch/img_1.png)
3.https://savesubs.com 中使用 F12 打开开发者控制台,导航至 application -> Cookies -> ...savesubs.com -> **cf_clearance**,复制该值并赋值到 `SAVESUBS_X_AUTH_TOKEN`
4. 登录 https://upstash.com,在 `Create a Redis Database` 页下点击 `Create database`
![img_3.jpg](public/deploy-ch/img_3.jpg)
根据情况输入基本信息:
![img_4.png](public/deploy-ch/img_4.png)
进入该数据库的控制台,下滑到 `REST API` 栏,点击复制`UPSTASH_REDIS_REST_URL``UPSTASH_REDIS_REST_TOKEN`,赋值到同名变量
![img_5.png](public%2Fdeploy-ch%2Fimg_5.png)
5. 登录 https://supabase.com/ ,新建一个 project
![img_6.png](public%2Fdeploy-ch%2Fimg_6.png)
确认后,点击右侧导航的齿轮进入设置,复制 `URL``SUPABASE_HOSTNAME`,复制 `key``NEXT_PUBLIC_SUPABASE_ANON_KEY`
![img_7.png](public%2Fdeploy-ch%2Fimg_7.png)
5. 使用 `#` 注释掉 Optional 下的所有项 (可选)
6. 运行 `npm run dev`
Binary file added public/deploy-ch/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/deploy-ch/img_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 220cf2a

Please sign in to comment.