Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8091f9df
authored
Jul 02, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update README
parent
b8816aac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
README.md
+4
-2
No files found.
README.md
View file @
8091f9df
...
@@ -158,8 +158,8 @@ sudo service nginx restart
...
@@ -158,8 +158,8 @@ sudo service nginx restart
### 多机部署
### 多机部署
1. 所有服务器
`
SESSION_SECRET
`
设置一样的值。
1. 所有服务器
`
SESSION_SECRET
`
设置一样的值。
2. 必须设置
`
SQL_DSN
`
,使用 MySQL 数据库而非 SQLite,所有服务器连接同一个数据库。
2. 必须设置
`
SQL_DSN
`
,使用 MySQL 数据库而非 SQLite,所有服务器连接同一个数据库。
3. 所有从服务器必须设置
`
NODE_TYPE
`
为
`
slave
`
。
3. 所有从服务器必须设置
`
NODE_TYPE
`
为
`
slave
`
,不设置则默认为主服务器
。
4. 设置
`
SYNC_FREQUENCY
`
后服务器将定期从数据库同步配置。
4. 设置
`
SYNC_FREQUENCY
`
后服务器将定期从数据库同步配置
,在使用远程数据库的情况下,推荐设置该项并启用 Redis,无论主从
。
5. 从服务器可以选择设置
`
FRONTEND_BASE_URL
`
,以重定向页面请求到主服务器。
5. 从服务器可以选择设置
`
FRONTEND_BASE_URL
`
,以重定向页面请求到主服务器。
6. 从服务器上
**
分别
**
装好 Redis,设置好
`
REDIS_CONN_STRING
`
,这样可以做到在缓存未过期的情况下数据库零访问,可以减少延迟。
6. 从服务器上
**
分别
**
装好 Redis,设置好
`
REDIS_CONN_STRING
`
,这样可以做到在缓存未过期的情况下数据库零访问,可以减少延迟。
7. 如果主服务器访问数据库延迟也比较高,则也需要启用 Redis,并设置
`
SYNC_FREQUENCY
`
,以定期从数据库同步配置。
7. 如果主服务器访问数据库延迟也比较高,则也需要启用 Redis,并设置
`
SYNC_FREQUENCY
`
,以定期从数据库同步配置。
...
@@ -231,6 +231,8 @@ docker run --name chatgpt-web -d -p 3002:3002 -e OPENAI_API_BASE_URL=https://ope
...
@@ -231,6 +231,8 @@ docker run --name chatgpt-web -d -p 3002:3002 -e OPENAI_API_BASE_URL=https://ope
等到系统启动后,使用 `root` 用户登录系统并做进一步的配置。
等到系统启动后,使用 `root` 用户登录系统并做进一步的配置。
**Note**:如果你不知道某个配置项的含义,可以临时删掉值以看到进一步的提示文字。
## 使用方法
## 使用方法
在`渠道`页面中添加你的 API Key,之后在`令牌`页面中新增访问令牌。
在`渠道`页面中添加你的 API Key,之后在`令牌`页面中新增访问令牌。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment