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
4ec02c65
authored
May 13, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
9a0c9262
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
21 deletions
+20
-21
.github/workflows/release.yml
+2
-2
Makefile
+3
-3
docs/deploy/docker.md
+4
-4
docs/deploy/fastgpt/clash/proxy.sh
+1
-1
docs/deploy/fastgpt/docker-compose.yml
+3
-4
docs/deploy/fastgpt/run.sh
+1
-1
docs/deploy/mac.md
+6
-6
No files found.
.github/workflows/release.yml
View file @
4ec02c65
...
@@ -37,12 +37,12 @@ jobs:
...
@@ -37,12 +37,12 @@ jobs:
-
name
:
build and publish image
-
name
:
build and publish image
env
:
env
:
# fork friendly ^^
# fork friendly ^^
DOCKER_REPO
:
ghcr.io/${{ github.repository_owner }}/fast
-
gpt
DOCKER_REPO
:
ghcr.io/${{ github.repository_owner }}/fastgpt
run
:
|
run
:
|
docker buildx build \
docker buildx build \
--platform linux/amd64,linux/arm64 \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/FastGPT" \
--label "org.opencontainers.image.description=fast
-
gpt image" \
--label "org.opencontainers.image.description=fastgpt image" \
--label "org.opencontainers.image.licenses=MIT" \
--label "org.opencontainers.image.licenses=MIT" \
--push \
--push \
-t ${DOCKER_REPO}:latest \
-t ${DOCKER_REPO}:latest \
...
...
Makefile
View file @
4ec02c65
SERVICE_NAME
=
fast
-
gpt
SERVICE_NAME
=
fastgpt
# Image URL to use all building/pushing image targets
# Image URL to use all building/pushing image targets
IMG
?=
$(SERVICE_NAME)
:latest
IMG
?=
$(SERVICE_NAME)
:latest
...
@@ -34,13 +34,13 @@ run: ## Run a dev service from host.
...
@@ -34,13 +34,13 @@ run: ## Run a dev service from host.
.PHONY
:
docker-build
.PHONY
:
docker-build
docker-build
:
##
Build docker image with the desktop-frontend.
docker-build
:
##
Build docker image with the desktop-frontend.
docker build
-t
c121914yu/fast-
gpt:latest
.
--network
host
--build-arg
HTTP_PROXY
=
http://127.0.0.1:7890
--build-arg
HTTPS_PROXY
=
http://127.0.0.1:7890
docker build
-t
registry.cn-hangzhou.aliyuncs.com/fastgpt/fast
gpt:latest
.
--network
host
--build-arg
HTTP_PROXY
=
http://127.0.0.1:7890
--build-arg
HTTPS_PROXY
=
http://127.0.0.1:7890
##@ Deployment
##@ Deployment
.PHONY
:
docker-run
.PHONY
:
docker-run
docker-run
:
##
Push docker image.
docker-run
:
##
Push docker image.
docker run
-d
-p
8008:3000
--name
fast
-gpt
-v
/web_project/yjl/fast-gpt/logs:/app/.next/logs c121914yu/fast-
gpt:latest
docker run
-d
-p
8008:3000
--name
fast
gpt
-v
/web_project/yjl/fastgpt/logs:/app/.next/logs registry.cn-hangzhou.aliyuncs.com/fastgpt/fast
gpt:latest
#TODO: add support of docker push
#TODO: add support of docker push
...
...
docs/deploy/docker.md
View file @
4ec02c65
...
@@ -161,11 +161,11 @@ services:
...
@@ -161,11 +161,11 @@ services:
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/etc/localtime:/etc/localtime:ro
-
/etc/localtime:/etc/localtime:ro
fast
-
gpt
:
fastgpt
:
image
:
c121914yu/fast-
gpt:latest
image
:
registry.cn-hangzhou.aliyuncs.com/fastgpt/fast
gpt:latest
network_mode
:
host
network_mode
:
host
restart
:
always
restart
:
always
container_name
:
fast
-
gpt
container_name
:
fastgpt
environment
:
environment
:
# proxy(可选)
# proxy(可选)
-
AXIOS_PROXY_HOST=127.0.0.1
-
AXIOS_PROXY_HOST=127.0.0.1
...
@@ -225,7 +225,7 @@ docker-compose up -d
...
@@ -225,7 +225,7 @@ docker-compose up -d
echo
"Docker Compose 重新拉取镜像完成!"
echo
"Docker Compose 重新拉取镜像完成!"
# 删除本地旧镜像
# 删除本地旧镜像
images
=
$(
docker images
--format
"{{.ID}} {{.Repository}}"
|
grep
fast
-
gpt
)
images
=
$(
docker images
--format
"{{.ID}} {{.Repository}}"
|
grep
fastgpt
)
# 将镜像 ID 和名称放入数组中
# 将镜像 ID 和名称放入数组中
IFS
=
$'
\n
'
read
-rd
''
-a
image_array
<<<
"
$images
"
IFS
=
$'
\n
'
read
-rd
''
-a
image_array
<<<
"
$images
"
...
...
docs/deploy/fastgpt/clash/proxy.sh
View file @
4ec02c65
...
@@ -11,7 +11,7 @@ if [ ! -z "$OLD_PROCESS" ]; then
...
@@ -11,7 +11,7 @@ if [ ! -z "$OLD_PROCESS" ]; then
fi
fi
sleep 2
sleep 2
cd
/root/fast
-
gpt/clash/fast
cd
/root/fastgpt/clash/fast
rm
-f
./nohup.out
||
true
rm
-f
./nohup.out
||
true
rm
-f
./cache.db
||
true
rm
-f
./cache.db
||
true
nohup ./clash-linux-amd64-v3
-d
./ &
nohup ./clash-linux-amd64-v3
-d
./ &
...
...
docs/deploy/fastgpt/docker-compose.yml
View file @
4ec02c65
...
@@ -30,11 +30,11 @@ services:
...
@@ -30,11 +30,11 @@ services:
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/etc/localtime:/etc/localtime:ro
-
/etc/localtime:/etc/localtime:ro
fast
-
gpt
:
fastgpt
:
image
:
c121914yu/fast-
gpt:latest
image
:
registry.cn-hangzhou.aliyuncs.com/fastgpt/fast
gpt:latest
network_mode
:
host
network_mode
:
host
restart
:
always
restart
:
always
container_name
:
fast
-
gpt
container_name
:
fastgpt
environment
:
environment
:
# proxy(可选)
# proxy(可选)
-
AXIOS_PROXY_HOST=127.0.0.1
-
AXIOS_PROXY_HOST=127.0.0.1
...
@@ -78,4 +78,3 @@ services:
...
@@ -78,4 +78,3 @@ services:
# https证书,没有的话不填,对应的nginx.conf也要修改
# https证书,没有的话不填,对应的nginx.conf也要修改
-
/root/fastgpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
-
/root/fastgpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
-
/root/fastgpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
-
/root/fastgpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
docs/deploy/fastgpt/run.sh
View file @
4ec02c65
...
@@ -5,7 +5,7 @@ docker-compose up -d
...
@@ -5,7 +5,7 @@ docker-compose up -d
echo
"Docker Compose 重新拉取镜像完成!"
echo
"Docker Compose 重新拉取镜像完成!"
# 删除本地旧镜像
# 删除本地旧镜像
images
=
$(
docker images
--format
"{{.ID}} {{.Repository}}"
|
grep
fast
-
gpt
)
images
=
$(
docker images
--format
"{{.ID}} {{.Repository}}"
|
grep
fastgpt
)
# 将镜像 ID 和名称放入数组中
# 将镜像 ID 和名称放入数组中
IFS
=
$'
\n
'
read
-rd
''
-a
image_array
<<<
"
$images
"
IFS
=
$'
\n
'
read
-rd
''
-a
image_array
<<<
"
$images
"
...
...
docs/deploy/mac.md
View file @
4ec02c65
...
@@ -19,15 +19,15 @@ docker -v
...
@@ -19,15 +19,15 @@ docker -v
6、需要创建一个放置 pg 和 mongo 数据的文件夹,这里创建在
`~/fastgpt`
目录中,里面有
`pg`
和
`mongo `
两个文件夹
6、需要创建一个放置 pg 和 mongo 数据的文件夹,这里创建在
`~/fastgpt`
目录中,里面有
`pg`
和
`mongo `
两个文件夹
```
```
➜ fast
-
gpt pwd
➜ fastgpt pwd
/Users/jie/fast
-
gpt
/Users/jie/fastgpt
➜ fast
-
gpt ls
➜ fastgpt ls
mongo pg
mongo pg
```
```
### docker 部署方式
### docker 部署方式
这种方式主要是为了方便调试,可以使用
`pnpm dev `
运行 fast
-
gpt 项目
这种方式主要是为了方便调试,可以使用
`pnpm dev `
运行 fastgpt 项目
**1、.env.local 文件**
**1、.env.local 文件**
...
@@ -61,13 +61,13 @@ PG_DB_NAME=xxx
...
@@ -61,13 +61,13 @@ PG_DB_NAME=xxx
**2、部署 mongo**
**2、部署 mongo**
```
```
docker run --name mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password -v ~/fast
-
gpt/mongo/data:/data/db -d mongo:4.0.1
docker run --name mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password -v ~/fastgpt/mongo/data:/data/db -d mongo:4.0.1
```
```
**3、部署 pgsql**
**3、部署 pgsql**
```
```
docker run -it --name pg -e "POSTGRES_PASSWORD=xxx" -e POSTGRES_USER=xxx -p 8100:5432 -v ~/fast
-
gpt/pg/data:/var/lib/postgresql/data -d octoberlan/pgvector:v0.4.1
docker run -it --name pg -e "POSTGRES_PASSWORD=xxx" -e POSTGRES_USER=xxx -p 8100:5432 -v ~/fastgpt/pg/data:/var/lib/postgresql/data -d octoberlan/pgvector:v0.4.1
```
```
进 pgsql 容器运行
进 pgsql 容器运行
...
...
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