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
d807f9d0
authored
May 08, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deploy file
parent
3ef6d3fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
21 deletions
+48
-21
README.md
+1
-1
deploy/docker-compose.yml
+34
-20
deploy/nginx/nginx.conf
+13
-0
No files found.
README.md
View file @
d807f9d0
...
...
@@ -83,7 +83,7 @@ docker-compose -v
#### 2. 创建 3 个初始化文件
手动创建或者直接把 deploy 里内容复制过去
手动创建或者直接把 deploy 里内容复制过去
,然后把 deploy 文件夹改名为: fastgpt
**/root/fastgpt/pg/init.sql PG 数据库初始化**
...
...
deploy/docker-compose.yml
View file @
d807f9d0
...
...
@@ -6,26 +6,35 @@ services:
restart
:
always
container_name
:
fast-gpt
environment
:
# - AXIOS_PROXY_HOST=127.0.0.1
# - AXIOS_PROXY_PORT=7890
# - OPENAI_BASE_URL=https://api.openai.com/v1
# - OPENAI_BASE_URL_AUTH=可选的安全凭证
# proxy(可选)
-
AXIOS_PROXY_HOST=127.0.0.1
-
AXIOS_PROXY_PORT=7890
# openai 中转连接(可选)
-
OPENAI_BASE_URL=https://api.openai.com/v1
-
OPENAI_BASE_URL_AUTH=可选的安全凭证
# 是否开启队列任务。 1-开启,0-关闭(请求 parentUrl 去执行任务,单机时直接填1)
-
queueTask=1
-
parentUrl=https://hostname/api/openapi/startEvents
# 发送邮箱验证码配置。用的是QQ邮箱。参考 nodeMail 获取MAILE_CODE,自行百度。
-
MY_MAIL=xxxx@qq.com
-
MAILE_CODE=xxxx
# 阿里短信服务(邮箱和短信至少二选一)
-
aliAccessKeyId=xxxx
-
aliAccessKeySecret=xxxx
-
aliSignName=xxxxx
-
aliTemplateCode=SMS_xxxx
# token加密凭证(随便填,作为登录凭证)
-
TOKEN_KEY=xxxx
-
queueTask=1
-
parentUrl=https://hostname/api/openapi/startEvents
# 和下方mongo镜像的username,password对应
-
MONGODB_URI=mongodb://username:passsword@0.0.0.0:27017/?authSource=admin
-
MONGODB_NAME=xxx
-
PG_HOST=0.0.0.0
-
PG_PORT=8100
-
PG_USER=xxx
-
PG_PASSWORD=xxx
-
PG_DB_NAME=xxx
# 和下方PG镜像对应.
-
PG_USER=fastgpt
# POSTGRES_USER
-
PG_PASSWORD=1234
# POSTGRES_PASSWORD
-
PG_DB_NAME=fastgpt
# POSTGRES_DB
# openai api key
-
OPENAIKEY=sk-xxxxx
nginx
:
image
:
nginx:alpine3.17
...
...
@@ -33,10 +42,12 @@ services:
restart
:
always
network_mode
:
host
volumes
:
-
/root/fast-gpt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
-
/root/fast-gpt/nginx/logs:/var/log/nginx
-
/root/fast-gpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
-
/root/fast-gpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
# 刚创建的文件
-
/root/fastgpt/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
-
/root/fastgpt/nginx/logs:/var/log/nginx
# https证书,没有的话不填,对应的nginx.conf也要修改
-
/root/fastgpt/nginx/ssl/docgpt.key:/ssl/docgpt.key
-
/root/fastgpt/nginx/ssl/docgpt.pem:/ssl/docgpt.pem
pg
:
image
:
ankane/pgvector
container_name
:
pg
...
...
@@ -44,12 +55,14 @@ services:
ports
:
-
8100:5432
environment
:
-
POSTGRES_USER=xxx
-
POSTGRES_PASSWORD=xxx
-
POSTGRES_DB=xxx
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
-
POSTGRES_USER=fastgpt
-
POSTGRES_PASSWORD=1234
-
POSTGRES_DB=fastgpt
volumes
:
-
/root/fast-gpt/pg/data:/var/lib/postgresql/data
-
/root/fast-gpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
# 刚创建的文件
-
/root/fastgpt/pg/init.sql:/docker-entrypoint-initdb.d/init.sh
-
/root/fastgpt/pg/data:/var/lib/postgresql/data
-
/etc/localtime:/etc/localtime:ro
mongodb
:
image
:
mongo:6.0.4
...
...
@@ -58,9 +71,10 @@ services:
ports
:
-
27017:27017
environment
:
# 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果
-
MONGO_INITDB_ROOT_USERNAME=username
-
MONGO_INITDB_ROOT_PASSWORD=password
volumes
:
-
/root/fast
-
gpt/mongo/data:/data/db
-
/root/fast
-
gpt/mongo/logs:/var/log/mongodb
-
/root/fastgpt/mongo/data:/data/db
-
/root/fastgpt/mongo/logs:/var/log/mongodb
-
/etc/localtime:/etc/localtime:ro
deploy/nginx/nginx.conf
View file @
d807f9d0
...
...
@@ -54,4 +54,16 @@ http {
server_name
docgpt.ahapocket.cn
;
rewrite
^(.*)
https://
$server_name$1
permanent
;
}
server
{
listen
3000
;
server_name
120
.0.0.0
;
location
/
{
proxy_pass
http://localhost:3000
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
}
}
}
\ No newline at end of file
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