Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
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
Unverified
Commit
34ab66bb
authored
Aug 24, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: docs
parent
a5c8f347
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
38 deletions
+38
-38
docSite/content/docs/development.md
+10
-8
docSite/content/docs/installation/docker.md
+23
-25
docSite/content/docs/installation/reference/configuration.md
+5
-5
No files found.
docSite/content/docs/development.md
View file @
34ab66bb
---
---
weight
:
500
weight
:
500
title
:
"
开发指南"
title
:
'
开发指南'
description
:
"
对
FastGPT
进行开发调试"
description
:
'
对
FastGPT
进行开发调试'
icon
:
"
developer_guide"
icon
:
'
developer_guide'
draft
:
false
draft
:
false
images
:
[]
images
:
[]
---
---
...
@@ -23,7 +23,7 @@ images: []
...
@@ -23,7 +23,7 @@ images: []
要设置一个可工作的开发环境,只需 Fork 项目的 Git 存储库,并部署一个数据库,然后开始进行开发测试。
要设置一个可工作的开发环境,只需 Fork 项目的 Git 存储库,并部署一个数据库,然后开始进行开发测试。
### Fork存储库
### Fork
存储库
您需要 Fork
[
存储库
](
https://github.com/labring/FastGPT
)
。
您需要 Fork
[
存储库
](
https://github.com/labring/FastGPT
)
。
...
@@ -49,13 +49,15 @@ client 目录下为 FastGPT 核心代码。NextJS 框架前后端放在一起,
...
@@ -49,13 +49,15 @@ client 目录下为 FastGPT 核心代码。NextJS 框架前后端放在一起,
**2. config 配置文件**
**2. config 配置文件**
复制 data/config.json 文件,生成一个 data/config.local.json 配置文件。
复制 data/config.json 文件,生成一个 data/config.local.json 配置文件。具体的参数说明,可参考
[
config 配置说名
](
/docs/installation/reference/configuration
)
**注意:json 配置文件不能包含注释,介绍中为了方便看才加入的注释**
这个文件大部分时候不需要修改。只需要关注 SystemParams 里的参数:
这个文件大部分时候不需要修改。只需要关注 SystemParams 里的参数:
+
`vectorMaxProcess`
: 向量生成最大进程,根据数据库和 key 的并发数来决定,通常单个 120 号,2c4g 服务器设置
10~15。
-
`vectorMaxProcess`
: 向量生成最大进程,根据数据库和 key 的并发数来决定,通常单个 120 号,2c4g 服务器设置
10~15。
+
`qaMaxProcess`
: QA 生成最大进程
-
`qaMaxProcess`
: QA 生成最大进程
+
`pgIvfflatProbe`
: PostgreSQL vector 搜索探针,没有添加 vector 索引时可忽略。
-
`pgIvfflatProbe`
: PostgreSQL vector 搜索探针,没有添加 vector 索引时可忽略。
### 运行
### 运行
...
...
docSite/content/docs/installation/docker.md
View file @
34ab66bb
---
---
title
:
"
Docker
Compose
快速部署"
title
:
'
Docker
Compose
快速部署'
description
:
"
使用
Docker
Compose
快速部署
FastGPT"
description
:
'
使用
Docker
Compose
快速部署
FastGPT'
icon
:
"
"
icon
:
'
'
draft
:
false
draft
:
false
toc
:
true
toc
:
true
weight
:
720
weight
:
720
...
@@ -26,6 +26,7 @@ weight: 720
...
@@ -26,6 +26,7 @@ weight: 720
{{
<
tabs
tabTotal=
"3"
>
}}
{{
<
tabs
tabTotal=
"3"
>
}}
{{
<
tab
tabName=
"Linux"
>
}}
{{
<
tab
tabName=
"Linux"
>
}}
{{
<
markdownify
>
}}
{{
<
markdownify
>
}}
```
bash
```
bash
# 安装 Docker
# 安装 Docker
curl
-sSL
https://get.daocloud.io/docker | sh
curl
-sSL
https://get.daocloud.io/docker | sh
...
@@ -37,6 +38,7 @@ chmod +x /usr/local/bin/docker-compose
...
@@ -37,6 +38,7 @@ chmod +x /usr/local/bin/docker-compose
docker
-v
docker
-v
docker-compose
-v
docker-compose
-v
```
```
{{
<
/
markdownify
>
}}
{{
<
/
markdownify
>
}}
{{
<
/
tab
>
}}
{{
<
/
tab
>
}}
{{
<
tab
tabName=
"MacOS"
>
}}
{{
<
tab
tabName=
"MacOS"
>
}}
...
@@ -49,35 +51,38 @@ brew install orbstack
...
@@ -49,35 +51,38 @@ brew install orbstack
或者直接
[
下载安装包
](
https://orbstack.dev/download
)
进行安装。
或者直接
[
下载安装包
](
https://orbstack.dev/download
)
进行安装。
{{
<
/
markdownify
>
}}
{{
<
/
markdownify
>
}}
{{
<
/
tab
>
}}
{{
<
/
tab
>
}}
{{
<
tab
tabName=
"Windows"
>
}}
{{
<
tab
tabName=
"Windows"
>
}}
{{
<
markdownify
>
}}
{{
<
markdownify
>
}}
我们建议将源代码和其他数据绑定到 Linux 容器中时,将其存储在 Linux 文件系统中,而不是 Windows 文件系统中。
可以选择直接
[
使用 WSL 2 后端在 Windows 中安装 Docker Desktop
](
https://docs.docker.com/desktop/wsl/
)
。
> 我们建议将源代码和其他数据绑定到 Linux 容器中时,将其存储在 Linux 文件系统中,而不是 Windows 文件系统中。
>
> 可以选择直接[使用 WSL 2 后端在 Windows 中安装 Docker Desktop](https://docs.docker.com/desktop/wsl/)。
>
> 也可以直接[在 WSL 2 中安装命令行版本的 Docker](https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop)。
也可以直接
[
在 WSL 2 中安装命令行版本的 Docker
](
https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop
)
。
{{
<
/
markdownify
>
}}
{{
<
/
markdownify
>
}}
{{
<
/
tab
>
}}
{{
<
/
tab
>
}}
{{
<
/
tabs
>
}}
{{
<
/
tabs
>
}}
## 创建 docker-compose.yml 文件
## 创建 docker-compose.yml 文件
先创建一个目录(例如 fastgpt)并进入该目录:
先创建一个目录(例如 fastgpt)并进入该目录
,创建一个 docker-compose.yml 文件
:
```
bash
```
bash
mkdir fastgpt
mkdir fastgpt
cd
fastgpt
cd
fastgpt
touch docker-compose.yml
```
```
创建一个 docker-compose.yml 文件,粘贴下面的内容:
粘贴下面的内容,仅需把
`CHAT_API_KEY`
修改成 openai key 即可。如果需要使用中转或 oneapi 还需要修改
`OPENAI_BASE_URL`
:
```
yaml
```
yaml
# 非 host 版本, 不使用本机代理
# 非 host 版本, 不使用本机代理
version
:
'
3.3'
version
:
'
3.3'
services
:
services
:
pg
:
pg
:
image
:
ankane/pgvector:v0.4.2
image
:
ankane/pgvector:v0.4.2
# docker
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.4.2 # 阿里云
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.4.2 # 阿里云
container_name
:
pg
container_name
:
pg
restart
:
always
restart
:
always
...
@@ -109,8 +114,8 @@ services:
...
@@ -109,8 +114,8 @@ services:
-
./mongo/data:/data/db
-
./mongo/data:/data/db
fastgpt
:
fastgpt
:
container_name
:
fastgpt
container_name
:
fastgpt
image
:
ghcr.io/labring/fastgpt:latest
# git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest # 阿里云
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest # 阿里云
image
:
ghcr.io/labring/fastgpt:latest
# github
ports
:
ports
:
-
3000:3000
-
3000:3000
networks
:
networks
:
...
@@ -128,21 +133,14 @@ services:
...
@@ -128,21 +133,14 @@ services:
-
DB_MAX_LINK=5
# database max link
-
DB_MAX_LINK=5
# database max link
-
TOKEN_KEY=any
-
TOKEN_KEY=any
-
ROOT_KEY=root_key
-
ROOT_KEY=root_key
# mongo 配置,不需要改
# mongo 配置,不需要改. 如果连不上,可能需要去掉 ?authSource=admin
-
MONGODB_URI=mongodb://username:password@mongo:27017/?authSource=admin
-
MONGODB_URI=mongodb://username:password@mongo:27017/fastgpt?authSource=admin
-
MONGODB_NAME=fastgpt
# pg配置. 不需要改
# pg配置
-
PG_URL=postgresql://username:password@pg:5432/postgres
-
PG_HOST=pg
-
PG_PORT=5432
-
PG_USER=username
-
PG_PASSWORD=password
-
PG_DB_NAME=postgres
networks
:
networks
:
fastgpt
:
fastgpt
:
```
```
> 只需要改 fastgpt 容器的 3 个参数即可启动。
## 启动容器
## 启动容器
```
bash
```
bash
...
@@ -152,7 +150,7 @@ docker-compose up -d
...
@@ -152,7 +150,7 @@ docker-compose up -d
## 访问 FastGPT
## 访问 FastGPT
目前可以通过
`
ip:3000`` 直接访问(注意防火墙)。登录用户名为
`
root
`,密码为刚刚环境变量里设置的 `
DEFAULT_ROOT_PSW
`。
目前可以通过
`
ip:3000`` 直接访问(注意防火墙)。登录用户名为
`
root
`,密码为刚刚环境变量里设置的 `
DEFAULT_ROOT_PSW
`。
如果需要域名访问,请自行安装并配置 Nginx。
如果需要域名访问,请自行安装并配置 Nginx。
...
@@ -239,7 +237,6 @@ docker-compose up -d
...
@@ -239,7 +237,6 @@ docker-compose up -d
fastgpt:
fastgpt:
container_name: fastgpt
container_name: fastgpt
image: ghcr.io/labring/fastgpt:latest # github
image: ghcr.io/labring/fastgpt:latest # github
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest # 阿里云
ports:
ports:
- 3000:3000
- 3000:3000
networks:
networks:
...
@@ -249,8 +246,9 @@ fastgpt:
...
@@ -249,8 +246,9 @@ fastgpt:
- pg
- pg
restart: always
restart: always
environment:
environment:
# root 密码,用户名为: root
...
- DEFAULT_ROOT_PSW=1234
- DEFAULT_ROOT_PSW=1234
...
volumes:
volumes:
- ./config.json:/app/data/config.json
- ./config.json:/app/data/config.json
``
`
``
`
...
...
docSite/content/docs/installation/reference/configuration.md
View file @
34ab66bb
---
---
title
:
"
配置详解"
title
:
'
配置详解'
description
:
"
FastGPT
配置参数介绍"
description
:
'
FastGPT
配置参数介绍'
icon
:
"
settings"
icon
:
'
settings'
draft
:
false
draft
:
false
toc
:
true
toc
:
true
weight
:
751
weight
:
751
...
@@ -9,9 +9,9 @@ weight: 751
...
@@ -9,9 +9,9 @@ weight: 751
由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在
`client/data/config.json`
看到默认的配置文件。可以参考
[
docker-compose 快速部署
](
/docs/installation/docker/
)
来挂载配置文件。
由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在
`client/data/config.json`
看到默认的配置文件。可以参考
[
docker-compose 快速部署
](
/docs/installation/docker/
)
来挂载配置文件。
开发环境下
,你需要将示例配置文件
`config.json`
复制成
`config.local.json`
文件才会生效。
**开发环境下**
,你需要将示例配置文件
`config.json`
复制成
`config.local.json`
文件才会生效。
注意: 为了方便介绍,文档介绍里会把注释写到 json 文件,实际运行时候 json 文件不能包含注释。
**注意: 为了方便介绍,文档介绍里会把注释写到 json 文件,实际运行时候 json 文件不能包含注释。**
这个配置文件中包含了前端页面定制、系统级参数、AI 对话的模型等……
这个配置文件中包含了前端页面定制、系统级参数、AI 对话的模型等……
...
...
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