mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 04:06:18 +00:00

* Training status (#4424) * dataset data training state (#4311) * dataset data training state * fix * fix ts * fix * fix api format * fix * fix * perf: count training * format * fix: dataset training state (#4417) * fix * add test * fix * fix * fix test * fix test * perf: training count * count * loading status --------- Co-authored-by: heheer <heheer@sealos.io> * doc * website sync feature (#4429) * perf: introduce BullMQ for website sync (#4403) * perf: introduce BullMQ for website sync * feat: new redis module * fix: remove graceful shutdown * perf: improve UI in dataset detail - Updated the "change" icon SVG file. - Modified i18n strings. - Added new i18n string "immediate_sync". - Improved UI in dataset detail page, including button icons and background colors. * refactor: Add chunkSettings to DatasetSchema * perf: website sync ux * env template * fix: clean up website dataset when updating chunk settings (#4420) * perf: check setting updated * perf: worker currency * feat: init script for website sync refactor (#4425) * website feature doc --------- Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com> * pro migration (#4388) (#4433) * pro migration * reuse customPdfParseType Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com> * perf: remove loading ui * feat: config chat file expired time * Redis cache (#4436) * perf: add Redis cache for vector counting (#4432) * feat: cache * perf: get cache key --------- Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com> * perf: mobile voice input (#4437) * update:Mobile voice interaction (#4362) * Add files via upload * Add files via upload * Update ollama.md * Update ollama.md * Add files via upload * Update useSpeech.ts * Update ChatInput.tsx * Update useSpeech.ts * Update ChatInput.tsx * Update useSpeech.ts * Update constants.ts * Add files via upload * Update ChatInput.tsx * Update useSpeech.ts * Update useSpeech.ts * Update useSpeech.ts * Update ChatInput.tsx * Add files via upload * Update common.json * Update VoiceInput.tsx * Update ChatInput.tsx * Update VoiceInput.tsx * Update useSpeech.ts * Update useSpeech.ts * Update common.json * Update common.json * Update common.json * Update VoiceInput.tsx * Update VoiceInput.tsx * Update ChatInput.tsx * Update VoiceInput.tsx * Update ChatInput.tsx * Update VoiceInput.tsx * Update ChatInput.tsx * Update useSpeech.ts * Update common.json * Update chat.json * Update common.json * Update chat.json * Update common.json * Update chat.json * Update VoiceInput.tsx * Update ChatInput.tsx * Update useSpeech.ts * Update VoiceInput.tsx * speech ui * 优化语音输入组件,调整输入框显示逻辑,修复语音输入遮罩层样式,更新画布背景透明度,增强用户交互体验。 (#4435) * perf: mobil voice input --------- Co-authored-by: dreamer6680 <1468683855@qq.com> * Test completion v2 (#4438) * add v2 completions (#4364) * add v2 completions * completion config * config version * fix * frontend * doc * fix * fix: completions v2 api --------- Co-authored-by: heheer <heheer@sealos.io> * package * Test mongo log (#4443) * feat: mongodb-log (#4426) * perf: mongo log * feat: completions stop reasoner * mongo db log --------- Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com> * update doc * Update doc * fix external var ui (#4444) * action * fix: ts (#4458) * preview doc action add docs preview permission update preview action udpate action * update doc (#4460) * update preview action * update doc * remove * update * schema * update mq export;perf: redis cache (#4465) * perf: redis cache * update mq export * perf: website sync error tip * add error worker * website sync ui (#4466) * Updated the dynamic display of the voice input pop-up (#4469) * Update VoiceInput.tsx * Update VoiceInput.tsx * Update VoiceInput.tsx * fix: voice input --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com> Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com> Co-authored-by: dreamer6680 <1468683855@qq.com> Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
240 lines
7.8 KiB
YAML
240 lines
7.8 KiB
YAML
# 数据库的默认账号和密码仅首次运行时设置有效
|
||
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
|
||
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
|
||
# 如何无法访问 dockerhub 和 git,可以用阿里云(阿里云没有arm包)
|
||
|
||
version: '3.3'
|
||
services:
|
||
minio:
|
||
container_name: minio
|
||
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
|
||
environment:
|
||
MINIO_ACCESS_KEY: minioadmin
|
||
MINIO_SECRET_KEY: minioadmin
|
||
ports:
|
||
- '9001:9001'
|
||
- '9000:9000'
|
||
networks:
|
||
- fastgpt
|
||
volumes:
|
||
- ./minio:/minio_data
|
||
command: minio server /minio_data --console-address ":9001"
|
||
healthcheck:
|
||
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
|
||
interval: 30s
|
||
timeout: 20s
|
||
retries: 3
|
||
# milvus
|
||
milvusEtcd:
|
||
container_name: milvusEtcd
|
||
image: quay.io/coreos/etcd:v3.5.5
|
||
environment:
|
||
- ETCD_AUTO_COMPACTION_MODE=revision
|
||
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
||
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
||
- ETCD_SNAPSHOT_COUNT=50000
|
||
networks:
|
||
- fastgpt
|
||
volumes:
|
||
- ./milvus/etcd:/etcd
|
||
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
|
||
healthcheck:
|
||
test: ['CMD', 'etcdctl', 'endpoint', 'health']
|
||
interval: 30s
|
||
timeout: 20s
|
||
retries: 3
|
||
milvusStandalone:
|
||
container_name: milvusStandalone
|
||
image: milvusdb/milvus:v2.4.3
|
||
command: ['milvus', 'run', 'standalone']
|
||
security_opt:
|
||
- seccomp:unconfined
|
||
environment:
|
||
ETCD_ENDPOINTS: milvusEtcd:2379
|
||
MINIO_ADDRESS: minio:9000
|
||
networks:
|
||
- fastgpt
|
||
volumes:
|
||
- ./milvus/data:/var/lib/milvus
|
||
healthcheck:
|
||
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
|
||
interval: 30s
|
||
start_period: 90s
|
||
timeout: 20s
|
||
retries: 3
|
||
depends_on:
|
||
- 'milvusEtcd'
|
||
- 'minio'
|
||
|
||
mongo:
|
||
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
|
||
container_name: mongo
|
||
restart: always
|
||
ports:
|
||
- 27017:27017
|
||
networks:
|
||
- fastgpt
|
||
command: mongod --keyFile /data/mongodb.key --replSet rs0
|
||
environment:
|
||
- MONGO_INITDB_ROOT_USERNAME=myusername
|
||
- MONGO_INITDB_ROOT_PASSWORD=mypassword
|
||
volumes:
|
||
- ./mongo/data:/data/db
|
||
entrypoint:
|
||
- bash
|
||
- -c
|
||
- |
|
||
openssl rand -base64 128 > /data/mongodb.key
|
||
chmod 400 /data/mongodb.key
|
||
chown 999:999 /data/mongodb.key
|
||
echo 'const isInited = rs.status().ok === 1
|
||
if(!isInited){
|
||
rs.initiate({
|
||
_id: "rs0",
|
||
members: [
|
||
{ _id: 0, host: "mongo:27017" }
|
||
]
|
||
})
|
||
}' > /data/initReplicaSet.js
|
||
# 启动MongoDB服务
|
||
exec docker-entrypoint.sh "$$@" &
|
||
|
||
# 等待MongoDB服务启动
|
||
until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')"; do
|
||
echo "Waiting for MongoDB to start..."
|
||
sleep 2
|
||
done
|
||
|
||
# 执行初始化副本集的脚本
|
||
mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js
|
||
|
||
# 等待docker-entrypoint.sh脚本执行的MongoDB服务进程
|
||
wait $$!
|
||
redis:
|
||
image: redis:7.2-alpine
|
||
container_name: redis
|
||
# ports:
|
||
# - 6379:6379
|
||
networks:
|
||
- fastgpt
|
||
restart: always
|
||
command: |
|
||
redis-server --requirepass mypassword --loglevel warning --maxclients 10000 --appendonly yes --save 60 10 --maxmemory 4gb --maxmemory-policy noeviction
|
||
volumes:
|
||
- ./redis/data:/data
|
||
|
||
# fastgpt
|
||
sandbox:
|
||
container_name: sandbox
|
||
image: ghcr.io/labring/fastgpt-sandbox:v4.9.3 # git
|
||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.9.3 # 阿里云
|
||
networks:
|
||
- fastgpt
|
||
restart: always
|
||
fastgpt:
|
||
container_name: fastgpt
|
||
image: ghcr.io/labring/fastgpt:v4.9.3 # git
|
||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.9.3 # 阿里云
|
||
ports:
|
||
- 3000:3000
|
||
networks:
|
||
- fastgpt
|
||
depends_on:
|
||
- mongo
|
||
- milvusStandalone
|
||
- sandbox
|
||
restart: always
|
||
environment:
|
||
# 前端外部可访问的地址,用于自动补全文件资源路径。例如 https:fastgpt.cn,不能填 localhost。这个值可以不填,不填则发给模型的图片会是一个相对路径,而不是全路径,模型可能伪造Host。
|
||
- FE_DOMAIN=
|
||
# root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。
|
||
- DEFAULT_ROOT_PSW=1234
|
||
# AI Proxy 的地址,如果配了该地址,优先使用
|
||
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
|
||
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
|
||
- AIPROXY_API_TOKEN=aiproxy
|
||
# 模型中转地址(如果用了 AI Proxy,下面 2 个就不需要了,旧版 OneAPI 用户,使用下面的变量)
|
||
# - OPENAI_BASE_URL=http://oneapi:3000/v1
|
||
# - CHAT_API_KEY=sk-fastgpt
|
||
# 数据库最大连接数
|
||
- DB_MAX_LINK=30
|
||
# 登录凭证密钥
|
||
- TOKEN_KEY=any
|
||
# root的密钥,常用于升级时候的初始化请求
|
||
- ROOT_KEY=root_key
|
||
# 文件阅读加密
|
||
- FILE_TOKEN_KEY=filetoken
|
||
# MongoDB 连接参数. 用户名myusername,密码mypassword。
|
||
- MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin
|
||
# zilliz 连接参数
|
||
- MILVUS_ADDRESS=http://milvusStandalone:19530
|
||
- MILVUS_TOKEN=none
|
||
# Redis 地址
|
||
- REDIS_URL=redis://default:mypassword@redis:6379
|
||
# sandbox 地址
|
||
- SANDBOX_URL=http://sandbox:3000
|
||
# 日志等级: debug, info, warn, error
|
||
- LOG_LEVEL=info
|
||
- STORE_LOG_LEVEL=warn
|
||
# 工作流最大运行次数
|
||
- WORKFLOW_MAX_RUN_TIMES=1000
|
||
# 批量执行节点,最大输入长度
|
||
- WORKFLOW_MAX_LOOP_TIMES=100
|
||
# 自定义跨域,不配置时,默认都允许跨域(多个域名通过逗号分割)
|
||
- ALLOWED_ORIGINS=
|
||
# 是否开启IP限制,默认不开启
|
||
- USE_IP_LIMIT=false
|
||
volumes:
|
||
- ./config.json:/app/data/config.json
|
||
|
||
# AI Proxy
|
||
aiproxy:
|
||
image: ghcr.io/labring/aiproxy:v0.1.3
|
||
# image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.1.3 # 阿里云
|
||
container_name: aiproxy
|
||
restart: unless-stopped
|
||
depends_on:
|
||
aiproxy_pg:
|
||
condition: service_healthy
|
||
networks:
|
||
- fastgpt
|
||
environment:
|
||
# 对应 fastgpt 里的AIPROXY_API_TOKEN
|
||
- ADMIN_KEY=aiproxy
|
||
# 错误日志详情保存时间(小时)
|
||
- LOG_DETAIL_STORAGE_HOURS=1
|
||
# 数据库连接地址
|
||
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
|
||
# 最大重试次数
|
||
- RETRY_TIMES=3
|
||
# 不需要计费
|
||
- BILLING_ENABLED=false
|
||
# 不需要严格检测模型
|
||
- DISABLE_MODEL_CONFIG=true
|
||
healthcheck:
|
||
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
|
||
interval: 5s
|
||
timeout: 5s
|
||
retries: 10
|
||
aiproxy_pg:
|
||
image: pgvector/pgvector:0.8.0-pg15 # docker hub
|
||
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
|
||
restart: unless-stopped
|
||
container_name: aiproxy_pg
|
||
volumes:
|
||
- ./aiproxy_pg:/var/lib/postgresql/data
|
||
networks:
|
||
- fastgpt
|
||
environment:
|
||
TZ: Asia/Shanghai
|
||
POSTGRES_USER: postgres
|
||
POSTGRES_DB: aiproxy
|
||
POSTGRES_PASSWORD: aiproxy
|
||
healthcheck:
|
||
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
|
||
interval: 5s
|
||
timeout: 5s
|
||
retries: 10
|
||
networks:
|
||
fastgpt:
|