Compare commits
166 Commits
31e8df8bc0
...
v3.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c175ba28d | ||
|
|
e34592c3d4 | ||
|
|
fd044a4752 | ||
|
|
6e264ad500 | ||
|
|
83fd1ee983 | ||
|
|
7640de34e5 | ||
|
|
77846601ee | ||
|
|
b80dc6e23f | ||
|
|
176cc67a5c | ||
|
|
afaa86ef6e | ||
|
|
d1a820728f | ||
|
|
11bb1dba0f | ||
|
|
345d2819d8 | ||
|
|
36e3cf8c52 | ||
|
|
06ff95cdc3 | ||
|
|
9adeee6c83 | ||
|
|
e42d35f3bf | ||
|
|
a69d1f51b9 | ||
|
|
911ae6cb1f | ||
|
|
9a2f326e42 | ||
|
|
46a8d6b552 | ||
|
|
cf5423f69f | ||
|
|
177375a7b7 | ||
|
|
016bdbdd94 | ||
|
|
41e0dcb528 | ||
|
|
787e447d09 | ||
|
|
9c092ae3bb | ||
|
|
42bc8fea95 | ||
|
|
c4fc1e6fcf | ||
|
|
6f6d0893ec | ||
|
|
a6a55202a3 | ||
|
|
24bee53f9e | ||
|
|
afc9d3d17d | ||
|
|
97ce15d116 | ||
|
|
879fe48945 | ||
|
|
5d834d924a | ||
|
|
fece90b307 | ||
|
|
06d110ed16 | ||
|
|
dfcadda2bb | ||
|
|
3c9546ded9 | ||
|
|
a3d82e092e | ||
|
|
96a1b741df | ||
|
|
e7b7d1d084 | ||
|
|
efc30c3ac8 | ||
|
|
2ae13aafd4 | ||
|
|
e925050207 | ||
|
|
7aa67cfc2f | ||
|
|
6d38e2bf25 | ||
|
|
8ed5e61f63 | ||
|
|
c3c89f8cc8 | ||
|
|
a3a6bdbc55 | ||
|
|
07d9fc1f45 | ||
|
|
73a60e3591 | ||
|
|
c79848c654 | ||
|
|
ec092a11c3 | ||
|
|
9a7b727413 | ||
|
|
b8d16b7669 | ||
|
|
058a4aee2a | ||
|
|
1b50c7f9f1 | ||
|
|
e7f53fd55f | ||
|
|
07bdc5e585 | ||
|
|
e1b8a5f011 | ||
|
|
80ca76ea37 | ||
|
|
2c6ff66830 | ||
|
|
4f79a66559 | ||
|
|
22883b4334 | ||
|
|
081da6d18d | ||
|
|
74eb5b2530 | ||
|
|
b0328fe0ef | ||
|
|
2ee0aae57e | ||
|
|
d9c3de660a | ||
|
|
ccbf5c9520 | ||
|
|
c4f7c1f5d0 | ||
|
|
1208c46cca | ||
|
|
06a63c377e | ||
|
|
c1fc02894b | ||
|
|
0fa25032a3 | ||
|
|
28ad29d6ed | ||
|
|
bf7b5eac72 | ||
|
|
d602b805bd | ||
|
|
9cf18904bb | ||
|
|
2f39fa0f53 | ||
|
|
d2005cfa48 | ||
|
|
4e38f853f3 | ||
|
|
3cfb185dde | ||
|
|
ef99c540bb | ||
|
|
b9097b4989 | ||
|
|
3071bfd0f9 | ||
|
|
7bb938c145 | ||
|
|
75b21d3633 | ||
|
|
7ed9d8def4 | ||
|
|
63ed7ddb02 | ||
|
|
11696a016d | ||
|
|
5d14eb20af | ||
|
|
1a10104751 | ||
|
|
f95cb17933 | ||
|
|
0687b49542 | ||
|
|
27ad00ac3a | ||
|
|
c84d6247b0 | ||
|
|
f582f38570 | ||
|
|
13800dc389 | ||
|
|
619d9b1e84 | ||
|
|
556cc93f14 | ||
|
|
a50375616e | ||
|
|
e33447d023 | ||
|
|
7be277b3e6 | ||
|
|
5fa385e90b | ||
|
|
0a78966737 | ||
|
|
0eb7f00867 | ||
|
|
00ce7f2d98 | ||
|
|
003c066361 | ||
|
|
a5e7c59fd4 | ||
|
|
accac603cf | ||
|
|
7c96c730e6 | ||
|
|
a2dbdb30ff | ||
|
|
772e4af9bf | ||
|
|
e601eb6db5 | ||
|
|
84dbc2cfbf | ||
|
|
f160ec714b | ||
|
|
a8bd4b47a0 | ||
|
|
6c4c661516 | ||
|
|
b85c17a126 | ||
|
|
a59ddf6070 | ||
|
|
797ecbb054 | ||
|
|
b6b78afea9 | ||
|
|
0690156362 | ||
|
|
02240f3fd0 | ||
|
|
dc1e84bc52 | ||
|
|
4977df0ba8 | ||
|
|
27211b67f9 | ||
|
|
1600ab384e | ||
|
|
418805a1ef | ||
|
|
4c4b52bca7 | ||
|
|
7245259bc4 | ||
|
|
6690c8204c | ||
|
|
d8fc597f85 | ||
|
|
7f1146ecae | ||
|
|
0130028952 | ||
|
|
5a716da5a6 | ||
|
|
2470ec7573 | ||
|
|
e3fb25fba6 | ||
|
|
a916f14efc | ||
|
|
523628ade6 | ||
|
|
2259a2f717 | ||
|
|
8df37274da | ||
|
|
393057ab24 | ||
|
|
2aa7e0f4f1 | ||
|
|
b2d2fb34b8 | ||
|
|
c1e2a03178 | ||
|
|
fd38d2030e | ||
|
|
a42f881b67 | ||
|
|
20d531c0db | ||
|
|
1e6046cf52 | ||
|
|
495f2de6ef | ||
|
|
e97bd4e201 | ||
|
|
70e5e393ef | ||
|
|
8954f59cd7 | ||
|
|
c78b1a14a9 | ||
|
|
e768c4b356 | ||
|
|
d059f50ba6 | ||
|
|
26bcfbba8a | ||
|
|
d6e4a50d6e | ||
|
|
0a115f289e | ||
|
|
ee8c882b6f | ||
|
|
69ec2a33a4 | ||
|
|
1cd8ae1cd9 |
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
name: 漏洞报告
|
||||||
|
about: 报告项目中的Bug或安全问题
|
||||||
|
title: '[Bug] '
|
||||||
|
labels: 'bug'
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 问题描述
|
||||||
|
|
||||||
|
简要描述遇到的问题:
|
||||||
|
|
||||||
|
## 复现步骤
|
||||||
|
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
## 期望行为
|
||||||
|
|
||||||
|
描述你期望发生的情况:
|
||||||
|
|
||||||
|
## 实际行为
|
||||||
|
|
||||||
|
描述实际发生的情况:
|
||||||
|
|
||||||
|
## 环境信息
|
||||||
|
|
||||||
|
| 项目 | 信息 |
|
||||||
|
|:---|:---|
|
||||||
|
| 操作系统 | |
|
||||||
|
| JDK版本 | |
|
||||||
|
| 项目版本 | |
|
||||||
|
|
||||||
|
## 截图/日志
|
||||||
|
|
||||||
|
如有相关信息,请在此粘贴:
|
||||||
|
|
||||||
|
## 补充说明
|
||||||
|
|
||||||
|
其他补充信息:
|
||||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
15
.github/ISSUE_TEMPLATE/custom.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
name: 自定义
|
||||||
|
about: 其他问题或讨论
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 描述
|
||||||
|
|
||||||
|
请详细描述你的问题或需求:
|
||||||
|
|
||||||
|
## 补充信息
|
||||||
|
|
||||||
|
如有其他补充,请在此填写:
|
||||||
57
.github/ISSUE_TEMPLATE/enterprise-collaboration.md
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
name: 企业AI应用合作登记
|
||||||
|
about: 登记企业信息与合作意向,获取免费技术支持
|
||||||
|
title: '[合作登记] 企业AI应用需求登记'
|
||||||
|
labels: '合作登记'
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 登记说明
|
||||||
|
|
||||||
|
感谢您关注 RuoYi AI!我们团队今年的重点是帮助企业落地AI应用,如果贵公司符合要求,我们可以提供**免费的技术支持**。
|
||||||
|
|
||||||
|
请在下方评论中填写登记信息,格式如下:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 登记格式预览
|
||||||
|
|
||||||
|
| 字段 | 内容 |
|
||||||
|
|:---|:---|
|
||||||
|
| 公司名称 | (必填) |
|
||||||
|
| 公司Logo地址 | (可选) |
|
||||||
|
| 所属行业 | (必填) |
|
||||||
|
| 公司所在地 | (必填) |
|
||||||
|
| 项目名称 | (必填) |
|
||||||
|
| 项目Logo地址 | (可选) |
|
||||||
|
| 项目简介 | (必填) |
|
||||||
|
| 当前AI应用状态 | □ 尚未开始 □ 规划中 □ 已有初步应用 □ 已有成熟应用 |
|
||||||
|
| 计划落地时间 | □ 1个月内 □ 1-3个月 □ 3-6个月 □ 6个月以上 |
|
||||||
|
| 当前痛点或挑战 | (可选) |
|
||||||
|
| 公司简介 | (可选) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 可复制格式
|
||||||
|
|
||||||
|
复制下方内容并在评论中填写:
|
||||||
|
|
||||||
|
```
|
||||||
|
| 字段 | 内容 |
|
||||||
|
|:---|:---|
|
||||||
|
| 公司名称 | |
|
||||||
|
| 公司Logo地址 | |
|
||||||
|
| 所属行业 | |
|
||||||
|
| 公司所在地 | |
|
||||||
|
| 项目名称 | |
|
||||||
|
| 项目Logo地址 | |
|
||||||
|
| 项目简介 | |
|
||||||
|
| 当前AI应用状态 | |
|
||||||
|
| 计划落地时间 | |
|
||||||
|
| 当前痛点或挑战 | |
|
||||||
|
| 公司简介 | |
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> **温馨提示**:提交的信息仅用于合作沟通,不会对外公开。
|
||||||
31
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: 想法建议
|
||||||
|
about: 提出新功能建议或改进想法
|
||||||
|
title: '[Feature] '
|
||||||
|
labels: 'enhancement'
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## 建议类型
|
||||||
|
|
||||||
|
□ 新功能 □ 功能改进 □ 文档完善 □ 其他
|
||||||
|
|
||||||
|
## 建议描述
|
||||||
|
|
||||||
|
清晰描述你的建议内容:
|
||||||
|
|
||||||
|
## 使用场景
|
||||||
|
|
||||||
|
描述这个功能在什么场景下会用到:
|
||||||
|
|
||||||
|
## 期望效果
|
||||||
|
|
||||||
|
描述你期望的效果:
|
||||||
|
|
||||||
|
## 参考示例
|
||||||
|
|
||||||
|
如有类似的参考实现或产品,请提供链接:
|
||||||
|
|
||||||
|
## 补充说明
|
||||||
|
|
||||||
|
其他补充信息:
|
||||||
107
.github/workflows/publish-images.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
name: Publish Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: publish-images-${{ github.ref_name }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_OWNER: ${{ github.repository_owner }}
|
||||||
|
RELEASE_TAG: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish ${{ matrix.image }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- image: ruoyi-ai-backend
|
||||||
|
source: local
|
||||||
|
context: .
|
||||||
|
dockerfile: docs/docker/ruoyi-ai/Dockerfile.backend
|
||||||
|
- image: ruoyi-ai-mysql
|
||||||
|
source: local
|
||||||
|
context: .
|
||||||
|
dockerfile: docs/docker/ruoyi-ai/Dockerfile.mysql
|
||||||
|
- image: ruoyi-ai-admin
|
||||||
|
source: admin
|
||||||
|
context: build/ruoyi-admin
|
||||||
|
dockerfile: build/ruoyi-admin/apps/web-antd/Dockerfile
|
||||||
|
- image: ruoyi-ai-web
|
||||||
|
source: web
|
||||||
|
context: build/ruoyi-web
|
||||||
|
dockerfile: build/ruoyi-web/Dockerfile.frontend
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout backend repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Checkout admin repository
|
||||||
|
if: matrix.source == 'admin'
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
repository: ${{ github.repository_owner }}/ruoyi-admin
|
||||||
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
path: build/ruoyi-admin
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Checkout web repository
|
||||||
|
if: matrix.source == 'web'
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
repository: ${{ github.repository_owner }}/ruoyi-web
|
||||||
|
ref: ${{ env.RELEASE_TAG }}
|
||||||
|
path: build/ruoyi-web
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to GHCR
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ matrix.image }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ env.RELEASE_TAG }}
|
||||||
|
type=raw,value=latest
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
||||||
|
org.opencontainers.image.version=${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ${{ matrix.context }}
|
||||||
|
file: ${{ matrix.dockerfile }}
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha,scope=${{ matrix.image }}
|
||||||
|
cache-to: type=gha,mode=max,scope=${{ matrix.image }}
|
||||||
|
provenance: true
|
||||||
|
sbom: true
|
||||||
10
.gitignore
vendored
@@ -21,10 +21,16 @@ target/
|
|||||||
|
|
||||||
### IntelliJ IDEA ###
|
### IntelliJ IDEA ###
|
||||||
.idea
|
.idea
|
||||||
|
.claude
|
||||||
|
.github
|
||||||
|
!.github/
|
||||||
|
!.github/workflows/
|
||||||
|
!.github/workflows/**
|
||||||
*.iws
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
|
||||||
|
|
||||||
### JRebel ###
|
### JRebel ###
|
||||||
rebel.xml
|
rebel.xml
|
||||||
|
|
||||||
@@ -41,9 +47,13 @@ nbdist/
|
|||||||
*.log.gz
|
*.log.gz
|
||||||
*.xml.versionsBackup
|
*.xml.versionsBackup
|
||||||
*.swp
|
*.swp
|
||||||
|
data/
|
||||||
|
logs/
|
||||||
|
|
||||||
!*/build/*.java
|
!*/build/*.java
|
||||||
!*/build/*.html
|
!*/build/*.html
|
||||||
!*/build/*.xml
|
!*/build/*.xml
|
||||||
|
|
||||||
.flattened-pom.xml
|
.flattened-pom.xml
|
||||||
|
/.claude/settings.local.json
|
||||||
|
/docs/docker/milvus/volumes/
|
||||||
|
|||||||
285
README.md
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[![Contributors][contributors-shield]][contributors-url]
|
[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url]
|
||||||
[![Forks][forks-shield]][forks-url]
|
|
||||||
[![Stargazers][stars-shield]][stars-url]
|
|
||||||
[![Issues][issues-shield]][issues-url]
|
|
||||||
[![MIT License][license-shield]][license-url]
|
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -17,130 +13,235 @@
|
|||||||
|
|
||||||
<img src="docs/image/logo.png" alt="RuoYi AI Logo" width="120" height="120">
|
<img src="docs/image/logo.png" alt="RuoYi AI Logo" width="120" height="120">
|
||||||
|
|
||||||
## 功能建议&bug提交:【腾讯文档】
|
### Enterprise-Grade AI Assistant Platform
|
||||||
https://docs.qq.com/sheet/DR3hoR3FVVkpJcnVm
|
|
||||||
|
|
||||||
### 企业级AI助手平台
|
*An out-of-the-box full-stack AI platform supporting multi-agent collaboration, Supervisor mode orchestration, and multiple decision models, with advanced RAG technology and visual workflow orchestration capabilities*
|
||||||
|
|
||||||
*开箱即用的全栈AI平台,集成Coze、DIFY等主流AI平台,提供先进的RAG技术、知识图谱、数字人和AI流程编排能力*
|
**[中文](README_ZH.md)** | **[📖 Documentation](https://doc.ruoyiai.chat/)** |
|
||||||
|
**[🚀 Live Demo](https://web.ruoyiai.chat/)** | **[🐛 Report Issues](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 Feature Requests](https://github.com/ageerle/ruoyi-ai/issues)**
|
||||||
**[English](README_EN.md)** | **[📖 使用文档](https://doc.pandarobot.chat)** |
|
|
||||||
**[🚀 在线体验](https://web.pandarobot.chat)** | **[🐛 问题反馈](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 功能建议](https://github.com/ageerle/ruoyi-ai/issues)**
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## ✨ 核心亮点
|
## ✨ Core Features
|
||||||
|
|
||||||
### 智能AI引擎
|
| Module | Current Capabilities |
|
||||||
- **多模型接入**:支持 OpenAI、DeepSeek、通义千问、智谱AI 等主流厂商的模型
|
|:---:|---|
|
||||||
- **多模态理解**:支持文本、图片、文档等多种格式的智能处理
|
| **Model Management** | Multi-model integration (DeepSeek/Zhipu/MIMO/Bailian/OpenAI), multi-modal understanding, Coze/DIFY/FastGPT/RAGFlow platform integration |
|
||||||
- **AI平台集成**:集成了 **扣子(Coze)**、**DIFY**、**FastGPT** 等主流AI应用平台
|
| **Knowledge Management** | Local RAG + Vector DB (Milvus/Weaviate/Qdrant) + Document parsing |
|
||||||
- **MCP能力集成**:基于模型上下文协议,打造可扩展的AI工具生态系统
|
| **Tool Management** | MCP protocol integration, Skills capability + Extensible tool ecosystem |
|
||||||
- **AI编程助手**:内置智能代码分析和项目脚手架生成能力
|
| **Workflow Orchestration** | Visual workflow designer, drag-and-drop node orchestration, SSE streaming execution, currently supports model calls, email sending, manual review, and other nodes |
|
||||||
|
| **Multi-Agent** | Agent framework based on Langchain4j, Supervisor mode orchestration, supports multiple decision models, can flexibly combine tools and skills |
|
||||||
|
|
||||||
### 本地化RAG方案
|
### Project Repositories
|
||||||
- **私有知识库**:基于 Langchain4j 框架 + BGE-large-zh-v1.5 中文向量模型实现本地私有知识库
|
|
||||||
- **多种向量库**:支持 Milvus、Weaviate、Qdrant 等主流向量数据库
|
|
||||||
- **数据安全可控**:支持完全本地部署,保护企业数据隐私
|
|
||||||
- **灵活模型部署**:兼容 Ollama、vLLM 等本地推理框架
|
|
||||||
|
|
||||||
### AI创作工具
|
| Module | GitHub Repository | Gitee Repository | GitCode Repository |
|
||||||
- **AI 绘画创作**: 集成 MidJourney、GPT-4o-image
|
|
||||||
- **智能PPT生成**:一键将文本内容转换为精美演示文稿
|
|
||||||
|
|
||||||
### 知识图谱与智能编排
|
|
||||||
- **知识图谱构建**:自动从文档和对话中提取实体关系,构建可视化知识网络
|
|
||||||
- **AI 流程编排**:可视化工作流设计器,支持复杂AI任务的编排和自动化执行
|
|
||||||
- **数字人交互**:集成数字人形象,提供更自然的人机交互体验
|
|
||||||
|
|
||||||
## 🚀 快速体验
|
|
||||||
|
|
||||||
### 在线演示
|
|
||||||
|
|
||||||
- **用户端体验**:[web.pandarobot.chat](https://web.pandarobot.chat) (账号:admin 密码:admin123)
|
|
||||||
- **管理后台**:[admin.pandarobot.chat](https://admin.pandarobot.chat) (账号:admin 密码:admin123)
|
|
||||||
|
|
||||||
### 项目源码
|
|
||||||
|
|
||||||
| 项目模块 | GitHub 仓库 | Gitee 仓库 | GitCode 仓库 |
|
|
||||||
|----------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
|----------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
||||||
| 🔧 后端服务 | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
| 🔧 Backend | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
||||||
| 🎨 用户前端 | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
| 🎨 User Frontend | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
||||||
| 🛠️ 管理后台 | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
| 🛠️ Admin Panel | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
||||||
|
| 🎬 Drama | [ruoyi-drama](https://github.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitee.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitcode.com/ageerle/ruoyi-drama) |
|
||||||
|
| 🤖 Copilot | [ruoyi-copilot](https://github.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitee.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitcode.com/ageerle/ruoyi-copilot) |
|
||||||
|
| 📱 Mini-App | [ruoyi-uniapp](https://github.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitee.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitcode.com/ageerle/ruoyi-uniapp) |
|
||||||
|
|
||||||
## 🛠️ 技术架构
|
### Partner Projects
|
||||||
|
| Project Name | GitHub Repository | Gitee Repository |
|
||||||
|
|----------------|-------------------------------------------------------|------------------------------------------------------|
|
||||||
|
| element-plus-x | [element-plus-x](https://github.com/element-plus-x/Element-Plus-X) | [element-plus-x](https://gitee.com/he-jiayue/element-plus-x) |
|
||||||
|
|
||||||
### 核心框架
|
## 🛠️ Technical Architecture
|
||||||
- **后端架构**:Spring Boot 3.5 + Langchain4j
|
|
||||||
- **数据存储**:MySQL 8.0 + Redis + 向量数据库(Milvus/Weaviate/Qdrant)
|
|
||||||
- **前端技术**:Vue 3 + Vben Admin + Element UI
|
|
||||||
- **安全认证**:Sa-Token + JWT 双重保障
|
|
||||||
|
|
||||||
### 系统组件
|
### Core Framework
|
||||||
- **文档处理**:PDF、Word、Excel 解析,图像智能分析
|
- **Backend**: Spring Boot 3.5.8 + Langchain4j
|
||||||
- **实时通信**:WebSocket 实时通信,SSE 流式响应
|
- **Data Storage**: MySQL 8.0 + Redis + Vector Databases (Milvus/Weaviate/Qdrant)
|
||||||
- **系统监控**:完善的日志体系、性能监控、服务健康检查
|
- **Frontend**: Vue 3 + Vben Admin + element-plus-x
|
||||||
|
- **Security**: Sa-Token + JWT dual-layer security
|
||||||
|
- **Document Processing**: PDF, Word, Excel parsing, intelligent image analysis
|
||||||
|
- **Real-time Communication**: WebSocket real-time communication, SSE streaming response
|
||||||
|
- **System Monitoring**: Comprehensive logging system, performance monitoring, service health checks
|
||||||
|
|
||||||
## 📚 使用文档
|
## 🐳 Docker Deployment
|
||||||
|
|
||||||
想要深入了解安装部署、功能配置和二次开发?
|
This project provides two Docker deployment methods:
|
||||||
|
|
||||||
**👉 [完整使用文档](https://doc.pandarobot.chat)**
|
### Method 1: One-click Start All Services (Recommended)
|
||||||
|
|
||||||
## 🤝 参与贡献
|
Use `docker-compose-all.yaml` to start all services at once (including backend, admin panel, user frontend, and dependencies):
|
||||||
|
|
||||||
我们热烈欢迎社区贡献!无论您是资深开发者还是初学者,都可以为项目贡献力量 💪
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone https://github.com/ageerle/ruoyi-ai.git
|
||||||
|
cd ruoyi-ai
|
||||||
|
|
||||||
### 贡献方式
|
# Start all services (pull pre-built images from GHCR)
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
|
||||||
|
|
||||||
1. **Fork** 项目到您的账户
|
# Check service status
|
||||||
2. **创建分支** (`git checkout -b feature/新功能名称`)
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||||
3. **提交代码** (`git commit -m '添加某某功能'`)
|
|
||||||
4. **推送分支** (`git push origin feature/新功能名称`)
|
|
||||||
5. **发起 Pull Request**
|
|
||||||
|
|
||||||
> 💡 **小贴士**:建议将 PR 提交到 GitHub,我们会自动同步到其他代码托管平台
|
# Access services
|
||||||
|
# Admin Panel: http://localhost:25666 (admin / admin123)
|
||||||
|
# User Frontend: http://localhost:25137
|
||||||
|
# Backend API: http://localhost:26039
|
||||||
|
```
|
||||||
|
|
||||||
## 📄 开源协议
|
### Method 2: Step-by-step Deployment (Source Build)
|
||||||
|
|
||||||
本项目采用 **MIT 开源协议**,详情请查看 [LICENSE](LICENSE) 文件。
|
If you need to build backend services from source, follow these steps:
|
||||||
|
|
||||||
## 🙏 特别鸣谢
|
#### Step 1: Deploy Backend Service
|
||||||
|
|
||||||
感谢以下优秀的开源项目为本项目提供支持:
|
```bash
|
||||||
- [Spring AI Alibaba Copilot](https://github.com/spring-ai-alibaba/copilot) - 基于spring-ai-alibaba
|
# Enter backend project directory
|
||||||
的智能编码助手
|
cd ruoyi-ai
|
||||||
- [Langchain4j](https://github.com/langchain4j/langchain4j) - 强大的 Java LLM 开发框架
|
|
||||||
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - 成熟的企业级快速开发框架
|
|
||||||
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) - 现代化的 Vue 后台管理模板
|
|
||||||
|
|
||||||
## 🌐 生态伙伴
|
# Start backend service (build from source)
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
- [PPIO 派欧云](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - 提供高性价比的 GPU
|
# Wait for backend service to start
|
||||||
算力和模型 API 服务
|
docker-compose logs -f backend
|
||||||
- [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_ruoyi) - 万卡RTX40系GPU+海内外主流模型API服务,秒级响应,按量计费,新客免费用。
|
```
|
||||||
|
|
||||||
## 优秀开源项目及社区推荐
|
#### Step 2: Deploy Admin Panel
|
||||||
- [imaiwork](https://gitee.com/tsinghua-open/imaiwork) - AI手机开源版,AI获客手机项目,基于无障碍模式,RPA,比豆包AI手机更强大。
|
|
||||||
|
|
||||||
## 💬 社区交流
|
```bash
|
||||||
|
# Enter admin panel project directory
|
||||||
|
cd ruoyi-admin
|
||||||
|
|
||||||
|
# Build and start admin panel
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
|
# Access admin panel
|
||||||
|
# URL: http://localhost:5666
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Step 3: Deploy User Frontend (Optional)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Enter user frontend project directory
|
||||||
|
cd ruoyi-web
|
||||||
|
|
||||||
|
# Build and start user frontend
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
|
# Access user frontend
|
||||||
|
# URL: http://localhost:5137
|
||||||
|
```
|
||||||
|
|
||||||
|
### Service Ports
|
||||||
|
|
||||||
|
| Service | One-click Port | Step-by-step Port | Description |
|
||||||
|
|------|-------------|-------------|------|
|
||||||
|
| Admin Panel | 25666 | 5666 | Admin backend access |
|
||||||
|
| User Frontend | 25137 | 5137 | User frontend access |
|
||||||
|
| Backend Service | 26039 | 6039 | Backend API service |
|
||||||
|
| MySQL | 23306 | 23306 | Database service |
|
||||||
|
| Redis | 26379 | 6379 | Cache service |
|
||||||
|
| Weaviate | 28080 | 28080 | Vector database |
|
||||||
|
| MinIO API | 29000 | 9000 | Object storage API |
|
||||||
|
| MinIO Console | 29090 | 9090 | Object storage console |
|
||||||
|
|
||||||
|
### Image Registry
|
||||||
|
|
||||||
|
Application images are published to GitHub Container Registry (GHCR) by GitHub Actions when a release tag such as `v3.1.0` is pushed:
|
||||||
|
|
||||||
|
```
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-backend:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-mysql:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-admin:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-web:v3.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
The Compose file defaults to `latest`. To pin a release, create `docs/docker/ruoyi-ai/.env` with `RUIYI_VERSION=v3.1.0`.
|
||||||
|
|
||||||
|
After the first workflow run, set the four GHCR packages to `Public` in GitHub so deployment servers can pull them without logging in.
|
||||||
|
|
||||||
|
The same release tag must exist in `ageerle/ruoyi-admin` and `ageerle/ruoyi-web`; the publish workflow checks out those repositories at the backend release tag before building their images.
|
||||||
|
|
||||||
|
### Common Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Stop all services
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml down
|
||||||
|
|
||||||
|
# View service logs
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml logs -f [service-name]
|
||||||
|
|
||||||
|
# Restart a service
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml restart [service-name]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📚 Documentation
|
||||||
|
|
||||||
|
Want to learn more about installation, deployment, configuration, and secondary development?
|
||||||
|
|
||||||
|
**👉 [Complete Documentation](https://doc.ruoyiai.chat/)**
|
||||||
|
|
||||||
|
## 🤝 Contributing
|
||||||
|
|
||||||
|
We warmly welcome community contributions! Whether you are a seasoned developer or just getting started, you can contribute to the project 💪
|
||||||
|
|
||||||
|
### How to Contribute
|
||||||
|
|
||||||
|
1. **Fork** the project to your account
|
||||||
|
2. **Create a branch** (`git checkout -b feature/new-feature-name`)
|
||||||
|
3. **Commit your changes** (`git commit -m 'Add new feature'`)
|
||||||
|
4. **Push to the branch** (`git push origin feature/new-feature-name`)
|
||||||
|
5. **Create a Pull Request**
|
||||||
|
|
||||||
|
> 💡 **Tip**: We recommend submitting PRs to GitHub, we will automatically sync to other code hosting platforms
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
Thanks to the following excellent open-source projects for their support:
|
||||||
|
- [Langchain4j](https://github.com/langchain4j/langchain4j) - Powerful Java LLM development framework
|
||||||
|
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - Mature enterprise-level rapid development framework
|
||||||
|
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) - Modern Vue admin template
|
||||||
|
|
||||||
|
## 💎 Sponsors
|
||||||
|
|
||||||
|
**Thanks to the following sponsors for supporting this project:**
|
||||||
|
|
||||||
|
<a href="https://www.atlascloud.ai?ref=89F97E">
|
||||||
|
<img src="docs/image/sponsor/atlascloud_banner.png" alt="Atlas Cloud" width="160" height="80">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
[Visit Atlas Cloud](https://www.atlascloud.ai?ref=89F97E&utm_source=github&utm_campaign=ruoyi-drama) · [Coding Plan Promotion](https://www.atlascloud.ai/console/coding-plan)
|
||||||
|
A full-modal AI inference platform that gives developers a unified AI API, supporting video generation, image generation, and LLMs. Connect once to access **300+ curated models**.
|
||||||
|
|
||||||
|
<a href="https://www.volcengine.com/activity/codingplan?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ageerle-ruoyi-ai">
|
||||||
|
<img src="docs/image/sponsor/huoshan.png" alt="Volcengine CodingPlan" width="160" height="80">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
[Sign up to claim 25 million tokens — go now](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ageerle-ruoyi-ai)
|
||||||
|
Enjoy ByteDance's in-house Doubao models plus full-power open-source SOTA models, covering text, VLM, and image generation — all modalities in one stop: Seed-2.1, Seedream-5.0, GLM-5.2, DeepSeek, and more. Not just for coding — it can also tackle complex long-horizon Agent tasks!
|
||||||
|
|
||||||
|
## 💬 Community Chat
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<img src="docs/image/wx.png" alt="微信二维码" width="200" height="200"><br>
|
<img src="docs/image/wx.png" alt="WeChat QR Code" width="200" height="200"><br>
|
||||||
<strong>扫码添加作者微信</strong><br>
|
<strong>Scan to add author on WeChat</strong><br>
|
||||||
<em>邀请进群学习</em>
|
<em>Join group for learning</em>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<img src="docs/image/qq.png" alt="QQ群二维码" width="200" height="200"><br>
|
<img src="docs/image/wx06.png" alt="WeChat QR Code" width="200" height="200"><br>
|
||||||
<strong>QQ技术交流群</strong><br>
|
<strong>WeChat Tech Exchange Group</strong><br>
|
||||||
<em>技术讨论</em>
|
<em>Technical discussion</em>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<img src="docs/image/qq.png" alt="QQ Group QR Code" width="200" height="200"><br>
|
||||||
|
<strong>QQ Tech Exchange Group</strong><br>
|
||||||
|
<em>Technical discussion</em>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@@ -152,9 +253,9 @@ https://docs.qq.com/sheet/DR3hoR3FVVkpJcnVm
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
**[⭐ 点个Star支持一下](https://github.com/ageerle/ruoyi-ai)** • **[ Fork 开始贡献](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 English](README_EN.md)** • **[📖 查看完整文档](https://doc.pandarobot.chat)**
|
**[⭐ Star to Support](https://github.com/ageerle/ruoyi-ai)** • **[Fork to Contribute](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 中文](README_ZH.md)** • **[📖 Complete Documentation](https://doc.ruoyiai.chat/)**
|
||||||
|
|
||||||
*用 ❤️ 打造,由 RuoYi AI 开源社区维护*
|
*Built with ❤️, maintained by the RuoYi AI open-source community*
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
173
README_EN.md
@@ -1,173 +0,0 @@
|
|||||||
# RuoYi AI
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
[![Contributors][contributors-shield]][contributors-url]
|
|
||||||
[![Forks][forks-shield]][forks-url]
|
|
||||||
[![Stargazers][stars-shield]][stars-url]
|
|
||||||
[![Issues][issues-shield]][issues-url]
|
|
||||||
[![MIT License][license-shield]][license-url]
|
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://trendshift.io/repositories/13209">
|
|
||||||
<img src="https://trendshift.io/api/badge/repositories/13209" alt="GitHub Trending">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<img src="docs/image/logo.png" alt="RuoYi AI Logo" width="120" height="120">
|
|
||||||
|
|
||||||
### Enterprise-Grade AI Assistant Platform
|
|
||||||
|
|
||||||
*An out-of-the-box intelligent AI platform that integrates mainstream AI platforms such as Coze and DIFY, providing advanced RAG technology, knowledge graphs, digital humans, and AI workflow orchestration capabilities*
|
|
||||||
|
|
||||||
**[中文](README.md)** | **[📖 Documentation](https://doc.pandarobot.chat)** |
|
|
||||||
**[🚀 Live Demo](https://web.pandarobot.chat)** | **[🐛 Report Issues](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 Feature Requests](https://github.com/ageerle/ruoyi-ai/issues)**
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## ✨ Core Features
|
|
||||||
|
|
||||||
### Intelligent AI Engine
|
|
||||||
- **Multi-Model Integration**: Supports mainstream LLM providers including OpenAI, DeepSeek, Alibaba's Tongyi Qianwen, and Zhipu AI
|
|
||||||
- **Multi-Modal Understanding**: Intelligently processes multiple formats including text, images, and documents
|
|
||||||
- **AI Platform Integration**: Integrates mainstream AI application platforms like **Coze**, **DIFY**, and **FastGPT**
|
|
||||||
- **MCP Capability Integration**: Build an extensible AI toolkit ecosystem based on the Model Context Protocol
|
|
||||||
- **AI Coding Assistant**: Built-in intelligent code analysis and project scaffolding generation capabilities
|
|
||||||
|
|
||||||
### Local RAG Solution
|
|
||||||
- **Private Knowledge Base**: Implements local private knowledge base based on Langchain4j framework + BGE-large-zh-v1.5 Chinese vector model
|
|
||||||
- **Multiple Vector Databases**: Supports mainstream vector databases including Milvus, Weaviate, and Qdrant
|
|
||||||
- **Data Security & Privacy**: Supports fully local deployment to protect enterprise data privacy
|
|
||||||
- **Flexible Model Deployment**: Compatible with local inference frameworks like Ollama and vLLM
|
|
||||||
|
|
||||||
### AI Creative Tools
|
|
||||||
- **AI Image Generation**: Integrates MidJourney and GPT-4o-image
|
|
||||||
- **Intelligent PPT Generation**: Convert text content to beautiful presentations with one click
|
|
||||||
|
|
||||||
### Knowledge Graph & Intelligent Orchestration
|
|
||||||
- **Knowledge Graph Construction**: Automatically extract entity relationships from documents and conversations, build visualized knowledge networks
|
|
||||||
- **AI Workflow Orchestration**: Visual workflow designer supporting complex AI task orchestration and automated execution
|
|
||||||
- **Digital Human Interaction**: Integrated digital avatars providing more natural human-machine interaction experience
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
|
||||||
|
|
||||||
### Live Demo
|
|
||||||
|
|
||||||
- **User Experience**: [web.pandarobot.chat](https://web.pandarobot.chat) (Username: admin, Password: admin123)
|
|
||||||
- **Admin Dashboard**: [admin.pandarobot.chat](https://admin.pandarobot.chat) (Username: admin, Password: admin123)
|
|
||||||
|
|
||||||
### Project Repositories
|
|
||||||
|
|
||||||
| Module | GitHub Repository | Gitee Repository | GitCode Repository |
|
|
||||||
|------------------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
|
||||||
| 🔧 Backend | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
|
||||||
| 🎨 User Frontend | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
|
||||||
| 🛠️ Admin Panel | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
|
||||||
|
|
||||||
## 🛠️ Technical Architecture
|
|
||||||
|
|
||||||
### Core Framework
|
|
||||||
- **Backend**: Spring Boot 3.5 + Langchain4j
|
|
||||||
- **Data Storage**: MySQL 8.0 + Redis + Vector Databases (Milvus/Weaviate/Qdrant)
|
|
||||||
- **Frontend**: Vue 3 + Vben Admin + Element UI
|
|
||||||
- **Security**: Sa-Token + JWT dual-layer security
|
|
||||||
|
|
||||||
### System Components
|
|
||||||
- **Document Processing**: PDF, Word, and Excel parsing with intelligent image analysis
|
|
||||||
- **Real-Time Communication**: WebSocket real-time communication with SSE streaming responses
|
|
||||||
- **System Monitoring**: Comprehensive logging system, performance monitoring, and service health checks
|
|
||||||
|
|
||||||
## 📚 Documentation
|
|
||||||
|
|
||||||
Want to learn more about installation, deployment, configuration, and secondary development?
|
|
||||||
|
|
||||||
**👉 [Complete Documentation](https://doc.pandarobot.chat)**
|
|
||||||
|
|
||||||
## 🤝 Contributing
|
|
||||||
|
|
||||||
We warmly welcome community contributions! Whether you are a seasoned developer or just getting started, you can contribute to the project 💪
|
|
||||||
|
|
||||||
### How to Contribute
|
|
||||||
|
|
||||||
1. **Fork** the project to your account
|
|
||||||
2. **Create a branch** (`git checkout -b feature/new-feature-name`)
|
|
||||||
3. **Commit your changes** (`git commit -m 'Add new feature'`)
|
|
||||||
4. **Push to the branch** (`git push origin feature/new-feature-name`)
|
|
||||||
5. **Create a Pull Request**
|
|
||||||
|
|
||||||
> 💡 **Tip**: We recommend submitting PRs to GitHub, we will automatically sync to other code hosting platforms
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
|
|
||||||
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.
|
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
|
||||||
|
|
||||||
Thanks to the following excellent open-source projects for their support:
|
|
||||||
- [Spring AI Alibaba Copilot](https://github.com/spring-ai-alibaba/copilot) - Intelligent coding assistant based on spring-ai-alibaba
|
|
||||||
- [Langchain4j](https://github.com/langchain4j/langchain4j) - Powerful Java LLM development framework
|
|
||||||
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - Mature enterprise-level rapid development framework
|
|
||||||
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) - Modern Vue admin template
|
|
||||||
|
|
||||||
## 🌐 Ecosystem Partners
|
|
||||||
|
|
||||||
- [PPIO Cloud](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - Provides cost-effective GPU computing and model API services
|
|
||||||
- [Youyun Intelligent Computing](https://www.compshare.cn/?ytag=GPU_YY-gh_ruoyi) - Thousands of RTX40 series GPUs + mainstream models API services, second-level response, pay-per-use, free for new customers.
|
|
||||||
|
|
||||||
## Outstanding Open-Source Projects and Community Recommendations
|
|
||||||
- [imaiwork](https://gitee.com/tsinghua-open/imaiwork) - Open-source AI phone, AI customer acquisition phone project, based on accessibility mode and RPA, more powerful than Doubao AI phone.
|
|
||||||
|
|
||||||
## 💬 Community Chat
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<img src="docs/image/wx.png" alt="WeChat QR Code" width="200" height="200"><br>
|
|
||||||
<strong>Scan to Add Author's WeChat</strong><br>
|
|
||||||
<em>Invitation to join the group</em>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<img src="docs/image/qq.png" alt="QQ Group QR Code" width="200" height="200"><br>
|
|
||||||
<strong>QQ Technical Discussion Group</strong><br>
|
|
||||||
<em>Technical discussions</em>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
**[⭐ Star to Support](https://github.com/ageerle/ruoyi-ai)** • **[Fork to Contribute](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 中文](README.md)** • **[📖 Complete Documentation](https://doc.pandarobot.chat)**
|
|
||||||
|
|
||||||
*Built with ❤️, maintained by the RuoYi AI open-source community*
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Badge Links -->
|
|
||||||
|
|
||||||
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
|
||||||
|
|
||||||
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
|
||||||
|
|
||||||
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
|
||||||
|
|
||||||
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
|
||||||
|
|
||||||
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
|
||||||
|
|
||||||
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
|
||||||
|
|
||||||
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
|
||||||
|
|
||||||
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
|
||||||
|
|
||||||
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
|
||||||
|
|
||||||
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
|
||||||
282
README_ZH.md
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
# RuoYi AI
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url]
|
||||||
|
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://trendshift.io/repositories/13209">
|
||||||
|
<img src="https://trendshift.io/api/badge/repositories/13209" alt="GitHub Trending">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<img src="docs/image/logo.png" alt="RuoYi AI Logo" width="120" height="120">
|
||||||
|
|
||||||
|
### 企业级AI助手平台
|
||||||
|
|
||||||
|
*开箱即用的全栈AI平台,支持多智能体协同、Supervisor模式编排、多种决策模式、RAG技术和流程编排能力*
|
||||||
|
|
||||||
|
**[English](README.md)** | **[📖 使用文档](https://doc.ruoyiai.chat/)** |
|
||||||
|
**[🚀 在线体验](https://web.ruoyiai.chat/)** | **[🐛 问题反馈](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 功能建议](https://github.com/ageerle/ruoyi-ai/issues)**
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
## ✨ 核心亮点
|
||||||
|
|
||||||
|
| 模块 | 现有能力
|
||||||
|
|:---------:|---
|
||||||
|
| **模型管理** | 多模型接入(DeepSeek/智谱/MIMO/百炼/OpenAI)、多模态理解、Coze/DIFY/FastGPT/RAGFlow平台集成
|
||||||
|
| **知识管理** | 本地RAG + 向量库(Milvus/Weaviate/Qdrant) + 文档解析
|
||||||
|
| **工具管理** | Mcp协议集成、Skills能力 + 可扩展工具生态
|
||||||
|
| **流程编排** | 可视化工作流设计器、节点拖拽编排、SSE流式执行,目前已经支持模型调用,邮件发送,人工审核等节点
|
||||||
|
| **智能体管理** | 基于Langchain4j的Agent框架、Supervisor模式编排,支持多种决策模型,可以灵活搭配工具,skills
|
||||||
|
|
||||||
|
|
||||||
|
### 项目源码
|
||||||
|
|
||||||
|
| 项目模块 | GitHub 仓库 | Gitee 仓库 | GitCode 仓库 |
|
||||||
|
|----------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
||||||
|
| 🔧 后端服务 | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
||||||
|
| 🎨 用户前端 | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
||||||
|
| 🛠️ 管理后台 | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
||||||
|
| 🎬 短剧平台 | [ruoyi-drama](https://github.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitee.com/ageerle/ruoyi-drama) | [ruoyi-drama](https://gitcode.com/ageerle/ruoyi-drama) |
|
||||||
|
| 🤖 编程助手 | [ruoyi-copilot](https://github.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitee.com/ageerle/ruoyi-copilot) | [ruoyi-copilot](https://gitcode.com/ageerle/ruoyi-copilot) |
|
||||||
|
| 📱 小程序端 | [ruoyi-uniapp](https://github.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitee.com/ageerle/ruoyi-uniapp) | [ruoyi-uniapp](https://gitcode.com/ageerle/ruoyi-uniapp) |
|
||||||
|
|
||||||
|
### 合作项目
|
||||||
|
| 项目名称 | GitHub 仓库 | Gitee 仓库
|
||||||
|
|----------------|-------------------------------------------------------|------------------------------------------------------|
|
||||||
|
| element-plus-x | [element-plus-x](https://github.com/element-plus-x/Element-Plus-X) | [element-plus-x](https://gitee.com/he-jiayue/element-plus-x) |
|
||||||
|
|
||||||
|
## 🛠️ 技术架构
|
||||||
|
|
||||||
|
### 核心框架
|
||||||
|
- **后端架构**:Spring Boot 3.5.8 + Langchain4j
|
||||||
|
- **数据存储**:MySQL 8.0 + Redis + 向量数据库(Milvus/Weaviate/Qdrant)
|
||||||
|
- **前端技术**:Vue 3 + Vben Admin + element-plus-x
|
||||||
|
- **安全认证**:Sa-Token + JWT 双重保障
|
||||||
|
- **文档处理**:PDF、Word、Excel 解析,图像智能分析
|
||||||
|
- **实时通信**:WebSocket 实时通信,SSE 流式响应
|
||||||
|
- **系统监控**:完善的日志体系、性能监控、服务健康检查
|
||||||
|
|
||||||
|
## 🐳 Docker 部署
|
||||||
|
|
||||||
|
本项目提供两种 Docker 部署方式:
|
||||||
|
|
||||||
|
### 方式一:一键启动所有服务(推荐)
|
||||||
|
|
||||||
|
使用 `docker-compose-all.yaml` 可以一键启动所有服务(包括后端、管理端、用户端及依赖服务):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 克隆仓库
|
||||||
|
git clone https://github.com/ageerle/ruoyi-ai.git
|
||||||
|
cd ruoyi-ai
|
||||||
|
|
||||||
|
# 启动所有服务(从 GHCR 拉取预构建镜像)
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
|
||||||
|
|
||||||
|
# 查看服务状态
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||||
|
|
||||||
|
# 访问服务
|
||||||
|
# 管理端: http://localhost:25666 (admin / admin123)
|
||||||
|
# 用户端: http://localhost:25137
|
||||||
|
# 后端API: http://localhost:26039
|
||||||
|
```
|
||||||
|
|
||||||
|
### 方式二:分步部署(源码编译)
|
||||||
|
|
||||||
|
如果您需要从源码构建后端服务,请按照以下步骤操作:
|
||||||
|
|
||||||
|
#### 第一步:部署后端服务
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 进入后端项目目录
|
||||||
|
cd ruoyi-ai
|
||||||
|
|
||||||
|
# 启动后端服务(源码编译构建)
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
|
# 等待后端服务启动完成
|
||||||
|
docker-compose logs -f backend
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 第二步:部署管理端
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 进入管理端项目目录
|
||||||
|
cd ruoyi-admin
|
||||||
|
|
||||||
|
# 构建并启动管理端
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
|
# 访问管理端
|
||||||
|
# 地址: http://localhost:5666
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 第三步:部署用户端(可选)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 进入用户端项目目录
|
||||||
|
cd ruoyi-web
|
||||||
|
|
||||||
|
# 构建并启动用户端
|
||||||
|
docker-compose up -d --build
|
||||||
|
|
||||||
|
# 访问用户端
|
||||||
|
# 地址: http://localhost:5137
|
||||||
|
```
|
||||||
|
|
||||||
|
### 服务端口说明
|
||||||
|
|
||||||
|
| 服务 | 一键启动端口 | 分步部署端口 | 说明 |
|
||||||
|
|------|-------------|-------------|------|
|
||||||
|
| 管理端 | 25666 | 5666 | 管理后台访问地址 |
|
||||||
|
| 用户端 | 25137 | 5137 | 用户前端访问地址 |
|
||||||
|
| 后端服务 | 26039 | 6039 | 后端 API 服务 |
|
||||||
|
| MySQL | 23306 | 23306 | 数据库服务 |
|
||||||
|
| Redis | 26379 | 6379 | 缓存服务 |
|
||||||
|
| Weaviate | 28080 | 28080 | 向量数据库 |
|
||||||
|
| MinIO API | 29000 | 9000 | 对象存储 API |
|
||||||
|
| MinIO Console | 29090 | 9090 | 对象存储控制台 |
|
||||||
|
|
||||||
|
### 镜像仓库
|
||||||
|
|
||||||
|
每次推送类似 `v3.1.0` 的版本标签后,GitHub Actions 会自动构建并发布应用镜像到 GitHub Container Registry(GHCR):
|
||||||
|
|
||||||
|
```
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-backend:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-mysql:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-admin:v3.1.0
|
||||||
|
ghcr.io/ageerle/ruoyi-ai-web:v3.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Compose 默认使用 `latest`。如需固定版本,可在 `docs/docker/ruoyi-ai/.env` 中设置 `RUIYI_VERSION=v3.1.0`。
|
||||||
|
|
||||||
|
首次工作流运行完成后,请在 GitHub 的 Packages 设置中将这四个 GHCR 镜像设为 `Public`,用户服务器才能免登录拉取。
|
||||||
|
|
||||||
|
管理端 `ageerle/ruoyi-admin` 和用户端 `ageerle/ruoyi-web` 也必须存在同名版本标签;发布工作流会使用后端发布标签检出这两个仓库后再构建镜像。
|
||||||
|
|
||||||
|
### 常用命令
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 停止所有服务
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml down
|
||||||
|
|
||||||
|
# 查看服务日志
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml logs -f [服务名]
|
||||||
|
|
||||||
|
# 重启某个服务
|
||||||
|
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml restart [服务名]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📚 使用文档
|
||||||
|
|
||||||
|
想要深入了解安装部署、功能配置和二次开发?
|
||||||
|
|
||||||
|
**👉 [完整使用文档](https://doc.ruoyiai.chat/)**
|
||||||
|
|
||||||
|
## 🤝 参与贡献
|
||||||
|
|
||||||
|
我们热烈欢迎社区贡献!无论您是资深开发者还是初学者,都可以为项目贡献力量 💪
|
||||||
|
|
||||||
|
### 贡献方式
|
||||||
|
|
||||||
|
1. **Fork** 项目到您的账户
|
||||||
|
2. **创建分支** (`git checkout -b feature/新功能名称`)
|
||||||
|
3. **提交代码** (`git commit -m '添加某某功能'`)
|
||||||
|
4. **推送分支** (`git push origin feature/新功能名称`)
|
||||||
|
5. **发起 Pull Request**
|
||||||
|
|
||||||
|
> 💡 **小贴士**:建议将 PR 提交到 GitHub,我们会自动同步到其他代码托管平台
|
||||||
|
|
||||||
|
## 📄 开源协议
|
||||||
|
|
||||||
|
本项目采用 **MIT 开源协议**,详情请查看 [LICENSE](LICENSE) 文件。
|
||||||
|
|
||||||
|
## 🙏 特别鸣谢
|
||||||
|
|
||||||
|
感谢以下优秀的开源项目为本项目提供支持:
|
||||||
|
- [Langchain4j](https://github.com/langchain4j/langchain4j) - 强大的 Java LLM 开发框架
|
||||||
|
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - 成熟的企业级快速开发框架
|
||||||
|
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) - 现代化的 Vue 后台管理模板
|
||||||
|
|
||||||
|
|
||||||
|
## 💎 赞助商
|
||||||
|
|
||||||
|
**感谢以下赞助商对本项目的支持:**
|
||||||
|
|
||||||
|
<a href="https://www.atlascloud.ai?ref=89F97E">
|
||||||
|
<img src="docs/image/sponsor/atlascloud_banner.png" alt="Atlas Cloud" width="160" height="80">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
[访问Atlas Cloud官网](https://www.atlascloud.ai?ref=89F97E&utm_source=github&utm_campaign=ruoyi-drama) · [编程计划优惠](https://www.atlascloud.ai/console/coding-plan)
|
||||||
|
全模态 AI 推理平台,为开发者提供统一的 AI API,支持视频生成、图像生成和大语言模型。一次接入,即可访问 **300+ 精选模型**。
|
||||||
|
|
||||||
|
<a href="https://www.volcengine.com/activity/codingplan?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ageerle-ruoyi-ai">
|
||||||
|
<img src="docs/image/sponsor/huoshan.png" alt="火山引擎 CodingPlan" width="160" height="80">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
[注册即领2500万Tokens,立即前往](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ageerle-ruoyi-ai)
|
||||||
|
享字节自研豆包模型+满血版开源 SOTA模型,覆盖文本、VLM、图像生成,全模态一站配齐:Seed-2.1、Seedream-5.0、GLM-5.2、DeepSeek等。不止编程、更能解决 Agent 复杂长程任务!
|
||||||
|
|
||||||
|
|
||||||
|
## 💬 社区交流
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<img src="docs/image/wx.png" alt="微信二维码" width="200" height="200"><br>
|
||||||
|
<strong>扫码添加作者微信</strong><br>
|
||||||
|
<em>邀请进群学习</em>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<img src="docs/image/wx06.png" alt="微信二维码" width="200" height="200"><br>
|
||||||
|
<strong>微信技术交流群</strong><br>
|
||||||
|
<em>技术讨论</em>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<img src="docs/image/qq.png" alt="QQ群二维码" width="200" height="200"><br>
|
||||||
|
<strong>QQ技术交流群</strong><br>
|
||||||
|
<em>技术讨论</em>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
**[⭐ 点个Star支持一下](https://github.com/ageerle/ruoyi-ai)** • **[ Fork 开始贡献](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 English](README.md)** • **[📖 查看完整文档](https://doc.ruoyiai.chat/)**
|
||||||
|
|
||||||
|
*用 ❤️ 打造,由 RuoYi AI 开源社区维护*
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Badge Links -->
|
||||||
|
|
||||||
|
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
|
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
||||||
|
|
||||||
|
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
|
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
||||||
|
|
||||||
|
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
|
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
||||||
|
|
||||||
|
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
|
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
||||||
|
|
||||||
|
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
|
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
||||||
28
docs/docker/ minio/ docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
minio:
|
||||||
|
image: minio/minio
|
||||||
|
container_name: minio
|
||||||
|
ports:
|
||||||
|
- "9000:9000"
|
||||||
|
- "9090:9090"
|
||||||
|
environment:
|
||||||
|
- MINIO_ACCESS_KEY=ruoyi
|
||||||
|
- MINIO_SECRET_KEY=ruoyi123
|
||||||
|
volumes:
|
||||||
|
- minio_data:/data
|
||||||
|
- minio_config:/root/.minio
|
||||||
|
command: server /data --console-address ":9090"
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- minio-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
minio-net:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
minio_data:
|
||||||
|
minio_config:
|
||||||
65
docs/docker/ neo4j/docker-compose.yml
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
neo4j:
|
||||||
|
image: neo4j:5.15.0
|
||||||
|
container_name: ruoyi-neo4j
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
# HTTP端口
|
||||||
|
- "7474:7474"
|
||||||
|
# HTTPS端口
|
||||||
|
- "7473:7473"
|
||||||
|
# Bolt端口
|
||||||
|
- "7687:7687"
|
||||||
|
environment:
|
||||||
|
# 初始密码设置(首次启动后需要修改)
|
||||||
|
- NEO4J_AUTH=neo4j/your_password
|
||||||
|
# 接受许可协议
|
||||||
|
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
|
||||||
|
# 内存配置(根据服务器配置调整)
|
||||||
|
- NEO4J_dbms_memory_heap_initial__size=512m
|
||||||
|
- NEO4J_dbms_memory_heap_max__size=2g
|
||||||
|
- NEO4J_dbms_memory_pagecache_size=1g
|
||||||
|
# 事务日志配置
|
||||||
|
- NEO4J_dbms_tx__log_rotation_retention__policy=3 days
|
||||||
|
# 允许从任何主机连接
|
||||||
|
- NEO4J_dbms_default__listen__address=0.0.0.0
|
||||||
|
# 启用APOC插件
|
||||||
|
- NEO4J_dbms_security_procedures_unrestricted=apoc.*
|
||||||
|
- NEO4J_dbms_security_procedures_allowlist=apoc.*
|
||||||
|
# 日志级别
|
||||||
|
- NEO4J_dbms_logs_debug_level=INFO
|
||||||
|
volumes:
|
||||||
|
# 数据持久化
|
||||||
|
- neo4j_data:/data
|
||||||
|
# 日志持久化
|
||||||
|
- neo4j_logs:/logs
|
||||||
|
# 导入目录
|
||||||
|
- neo4j_import:/var/lib/neo4j/import
|
||||||
|
# 插件目录
|
||||||
|
- neo4j_plugins:/plugins
|
||||||
|
networks:
|
||||||
|
- ruoyi-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
start_period: 40s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
neo4j_data:
|
||||||
|
name: ruoyi-neo4j-data
|
||||||
|
neo4j_logs:
|
||||||
|
name: ruoyi-neo4j-logs
|
||||||
|
neo4j_import:
|
||||||
|
name: ruoyi-neo4j-import
|
||||||
|
neo4j_plugins:
|
||||||
|
name: ruoyi-neo4j-plugins
|
||||||
|
|
||||||
|
networks:
|
||||||
|
ruoyi-network:
|
||||||
|
name: ruoyi-network
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
70
docs/docker/milvus/docker-compose.yml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
services:
|
||||||
|
etcd:
|
||||||
|
container_name: ruoyi-rag-milvus-etcd
|
||||||
|
image: quay.io/coreos/etcd:v3.5.18
|
||||||
|
environment:
|
||||||
|
- ETCD_AUTO_COMPACTION_MODE=revision
|
||||||
|
- ETCD_AUTO_COMPACTION_RETENTION=1000
|
||||||
|
- ETCD_QUOTA_BACKEND_BYTES=4294967296
|
||||||
|
- ETCD_SNAPSHOT_COUNT=50000
|
||||||
|
volumes:
|
||||||
|
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd
|
||||||
|
command: etcd -advertise-client-urls=http://etcd: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
|
||||||
|
|
||||||
|
minio:
|
||||||
|
container_name: ruoyi-rag-milvus-minio
|
||||||
|
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
|
||||||
|
environment:
|
||||||
|
MINIO_ACCESS_KEY: minioadmin
|
||||||
|
MINIO_SECRET_KEY: minioadmin
|
||||||
|
volumes:
|
||||||
|
- ${DOCKER_VOLUME_DIRECTORY:-.}/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
|
||||||
|
|
||||||
|
standalone:
|
||||||
|
container_name: ruoyi-rag-milvus
|
||||||
|
image: milvusdb/milvus:v2.5.7
|
||||||
|
command: ["milvus", "run", "standalone"]
|
||||||
|
security_opt:
|
||||||
|
- seccomp:unconfined
|
||||||
|
environment:
|
||||||
|
ETCD_ENDPOINTS: etcd:2379
|
||||||
|
MINIO_ADDRESS: minio:9000
|
||||||
|
volumes:
|
||||||
|
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
|
||||||
|
interval: 30s
|
||||||
|
start_period: 90s
|
||||||
|
timeout: 20s
|
||||||
|
retries: 3
|
||||||
|
ports:
|
||||||
|
- "19530:19530"
|
||||||
|
- "9091:9091"
|
||||||
|
depends_on:
|
||||||
|
- "etcd"
|
||||||
|
- "minio"
|
||||||
|
|
||||||
|
attu:
|
||||||
|
container_name: ruoyi-rag-attu
|
||||||
|
image: zilliz/attu:v2.5.7
|
||||||
|
environment:
|
||||||
|
MILVUS_URL: milvus-standalone:19530
|
||||||
|
ports:
|
||||||
|
- "19500:3000" # 外部端口19500可以自定义
|
||||||
|
depends_on:
|
||||||
|
- "standalone"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: ruoyi-rag-milvus
|
||||||
20
docs/docker/qdrant/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
qdrant:
|
||||||
|
container_name: ruoyi-rag-qdrant
|
||||||
|
image: qdrant/qdrant:v1.17.0
|
||||||
|
ports:
|
||||||
|
- 6333:6333
|
||||||
|
- 6334:6334
|
||||||
|
volumes:
|
||||||
|
- qdrant_data:/qdrant/storage
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "bash -c 'exec 3<>/dev/tcp/127.0.0.1/6333 && printf \"GET /healthz HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n\" >&3 && grep -q \"200 OK\" <&3'"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 12
|
||||||
|
start_period: 10s
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
qdrant_data:
|
||||||
|
...
|
||||||
6
docs/docker/ruoyi-ai/.env.example
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# GitHub Container Registry namespace owner.
|
||||||
|
# For the upstream project this is ageerle; change it when using a fork.
|
||||||
|
IMAGE_OWNER=ageerle
|
||||||
|
|
||||||
|
# Use latest for convenience, or pin a release such as v3.1.0.
|
||||||
|
RUIYI_VERSION=latest
|
||||||
52
docs/docker/ruoyi-ai/Dockerfile.backend
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# RuoYi-AI 后端 Dockerfile
|
||||||
|
# 基于 Maven + OpenJDK 17
|
||||||
|
|
||||||
|
FROM maven:3.9-eclipse-temurin-17 AS builder
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
# 复制 pom.xml 和源码
|
||||||
|
COPY pom.xml .
|
||||||
|
COPY ruoyi-admin ./ruoyi-admin
|
||||||
|
COPY ruoyi-common ./ruoyi-common
|
||||||
|
COPY ruoyi-modules ./ruoyi-modules
|
||||||
|
COPY ruoyi-extend ./ruoyi-extend
|
||||||
|
|
||||||
|
|
||||||
|
# 构建项目 (使用 prod profile)
|
||||||
|
RUN mvn clean package -Pprod -DskipTests
|
||||||
|
|
||||||
|
# 最终运行镜像
|
||||||
|
FROM eclipse-temurin:17-jre-alpine
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
apk add --no-cache ffmpeg; \
|
||||||
|
for filter in scale pad fps setsar format tpad trim settb setpts xfade \
|
||||||
|
aresample aformat apad atrim asetpts anullsrc concat acrossfade; do \
|
||||||
|
ffmpeg -hide_banner -filters 2>/dev/null | grep -Eq "[[:space:]]${filter}[[:space:]]"; \
|
||||||
|
done; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q dissolve; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q fadeblack; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q slideleft; \
|
||||||
|
ffmpeg -hide_banner -encoders 2>/dev/null | grep -Eq '[[:space:]]libx264[[:space:]]'; \
|
||||||
|
ffmpeg -hide_banner -encoders 2>/dev/null | grep -Eq '[[:space:]]aac[[:space:]]'; \
|
||||||
|
ffprobe -hide_banner -version >/dev/null
|
||||||
|
|
||||||
|
ENV FFMPEG_PATH=/usr/bin/ffmpeg \
|
||||||
|
FFPROBE_PATH=/usr/bin/ffprobe
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 从构建阶段复制 jar 包
|
||||||
|
COPY --from=builder /build/ruoyi-admin/target/ruoyi-admin.jar ./ruoyi-admin.jar
|
||||||
|
|
||||||
|
# 创建日志目录
|
||||||
|
RUN mkdir -p /ruoyi/server/logs /ruoyi/server/temp
|
||||||
|
|
||||||
|
# 暴露端口
|
||||||
|
EXPOSE 6039
|
||||||
|
|
||||||
|
# 启动命令
|
||||||
|
ENTRYPOINT ["java", "-Djava.io.tmpdir=/ruoyi/server/temp", "-jar", "ruoyi-admin.jar", "--spring.profiles.active=prod"]
|
||||||
19
docs/docker/ruoyi-ai/Dockerfile.mysql
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# 基于官方MySQL 8.0镜像构建自定义镜像
|
||||||
|
# 构建命令: docker build -t registry.cn-hangzhou.aliyuncs.com/ruoyi-ai/mysql:v3 -f Dockerfile.mysql .
|
||||||
|
FROM mysql:8.0
|
||||||
|
|
||||||
|
# 设置时区
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
|
# MySQL 官方入口会按文件名顺序执行初始化目录中的 SQL。
|
||||||
|
# ruoyi-ai.sql 会导入 MYSQL_DATABASE,snail_job_mysql.sql 会自行创建并切换数据库。
|
||||||
|
COPY docs/script/sql/ruoyi-ai.sql /docker-entrypoint-initdb.d/01-ruoyi-ai.sql
|
||||||
|
COPY docs/script/sql/snail_job_mysql.sql /docker-entrypoint-initdb.d/02-snail-job.sql
|
||||||
|
|
||||||
|
# MySQL启动参数
|
||||||
|
CMD ["--default-authentication-plugin=mysql_native_password", \
|
||||||
|
"--character-set-server=utf8mb4", \
|
||||||
|
"--collation-server=utf8mb4_general_ci", \
|
||||||
|
"--explicit_defaults_for_timestamp=true", \
|
||||||
|
"--lower_case_table_names=1", \
|
||||||
|
"--skip-ssl"]
|
||||||
181
docs/docker/ruoyi-ai/docker-compose-all.yaml
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
# RuoYi-AI 一键启动全部服务
|
||||||
|
# 使用方式: docker-compose up -d
|
||||||
|
#
|
||||||
|
# 包含服务:
|
||||||
|
# - MySQL 8.0 (数据库,包含初始化SQL)
|
||||||
|
# - Redis 6.2 (缓存)
|
||||||
|
# - Weaviate (向量数据库)
|
||||||
|
# - MinIO (对象存储)
|
||||||
|
# - RuoYi-Backend (后端服务)
|
||||||
|
# - RuoYi-Admin (管理端前端)
|
||||||
|
# - RuoYi-Web (用户端前端)
|
||||||
|
#
|
||||||
|
# 镜像仓库地址: ghcr.io/ageerle
|
||||||
|
|
||||||
|
services:
|
||||||
|
# ==================== MySQL 数据库 ====================
|
||||||
|
mysql:
|
||||||
|
# GHCR 镜像(包含初始化SQL)
|
||||||
|
image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-mysql:${RUIYI_VERSION:-latest}
|
||||||
|
container_name: ruoyi-ai-mysql
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "23306:3306"
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: ruoyi-ai-agent
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
volumes:
|
||||||
|
- mysql-data:/var/lib/mysql
|
||||||
|
healthcheck:
|
||||||
|
# Force TCP: during first-time initialization MySQL exposes a temporary
|
||||||
|
# socket-only server. A socket ping would mark the service healthy before
|
||||||
|
# the real network listener (used by the backend) is ready.
|
||||||
|
test: ["CMD", "mysqladmin", "ping", "--protocol=tcp", "-h", "127.0.0.1", "-u", "root", "-proot"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 60s
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== Redis 缓存 ====================
|
||||||
|
redis:
|
||||||
|
image: redis:6.2
|
||||||
|
container_name: ruoyi-ai-redis
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "26379:6379"
|
||||||
|
volumes:
|
||||||
|
- redis-data:/data
|
||||||
|
command: redis-server --appendonly yes
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== Weaviate 向量数据库 ====================
|
||||||
|
weaviate:
|
||||||
|
image: semitechnologies/weaviate:1.30.0
|
||||||
|
container_name: ruoyi-ai-weaviate
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "28080:8080"
|
||||||
|
environment:
|
||||||
|
QUERY_DEFAULTS_LIMIT: 25
|
||||||
|
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true"
|
||||||
|
PERSISTENCE_DATA_PATH: /var/lib/weaviate
|
||||||
|
DEFAULT_VECTORIZER_MODULE: none
|
||||||
|
ENABLE_MODULES: text2vec-cohere,text2vec-huggingface,text2vec-palm,text2vec-openai,generative-openai,generative-cohere,generative-palm,ref2vec-centroid,reranker-cohere,qna-openai
|
||||||
|
CLUSTER_HOSTNAME: node1
|
||||||
|
volumes:
|
||||||
|
- weaviate-data:/var/lib/weaviate
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== MinIO 对象存储 ====================
|
||||||
|
minio:
|
||||||
|
image: minio/minio:latest
|
||||||
|
container_name: ruoyi-ai-minio
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "29000:9000"
|
||||||
|
- "29090:9090"
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: ruoyi
|
||||||
|
MINIO_ROOT_PASSWORD: ruoyi123
|
||||||
|
volumes:
|
||||||
|
- minio-data:/data
|
||||||
|
command: server /data --console-address ":9090"
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== RuoYi-AI 后端服务 ====================
|
||||||
|
backend:
|
||||||
|
image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-backend:${RUIYI_VERSION:-latest}
|
||||||
|
container_name: ruoyi-ai-backend
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "26039:6039"
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
# MySQL 配置
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_PRIMARY: master
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_DRIVERCLASSNAME: com.mysql.cj.jdbc.Driver
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: jdbc:mysql://mysql:3306/ruoyi-ai-agent?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: root
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: root
|
||||||
|
# Redis 配置
|
||||||
|
SPRING_DATA_REDIS_HOST: redis
|
||||||
|
SPRING_DATA_REDIS_PORT: 6379
|
||||||
|
SPRING_DATA_REDIS_DATABASE: 0
|
||||||
|
# 日志配置
|
||||||
|
LOGGING_LEVEL_ORG_RUOYI: info
|
||||||
|
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK: warn
|
||||||
|
SYS_UPLOAD_PATH: /ruoyi/upload
|
||||||
|
volumes:
|
||||||
|
- logs-data:/ruoyi/server/logs
|
||||||
|
- upload-data:/ruoyi/upload
|
||||||
|
depends_on:
|
||||||
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_started
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== RuoYi-AI 管理端前端 ====================
|
||||||
|
admin-frontend:
|
||||||
|
image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-admin:${RUIYI_VERSION:-latest}
|
||||||
|
container_name: ruoyi-ai-admin
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "25666:5666"
|
||||||
|
environment:
|
||||||
|
# 后端 API 地址 - 运行时动态配置(无需重新构建镜像)
|
||||||
|
# nginx upstream 配置不需要 http:// 前缀,直接使用 host:port
|
||||||
|
UPSTREAM_HOST: backend:6039
|
||||||
|
# 资源限制 - 防止 CPU 和内存耗尽
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '2'
|
||||||
|
memory: 3G
|
||||||
|
reservations:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 1G
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== RuoYi-AI 用户端前端 ====================
|
||||||
|
web-frontend:
|
||||||
|
image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-web:${RUIYI_VERSION:-latest}
|
||||||
|
container_name: ruoyi-ai-web
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "25137:5137"
|
||||||
|
environment:
|
||||||
|
UPSTREAM_URL: http://backend:6039
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# ==================== 网络配置 ====================
|
||||||
|
networks:
|
||||||
|
ruoyi-net:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
# ==================== 数据卷配置 ====================
|
||||||
|
volumes:
|
||||||
|
mysql-data:
|
||||||
|
redis-data:
|
||||||
|
weaviate-data:
|
||||||
|
minio-data:
|
||||||
|
logs-data:
|
||||||
|
upload-data:
|
||||||
146
docs/docker/ruoyi-ai/docker-compose.yaml
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# RuoYi-AI 一键启动后端服务
|
||||||
|
# 使用方式: docker-compose up -d --build
|
||||||
|
#
|
||||||
|
# 包含服务:
|
||||||
|
# - MySQL 8.0 (数据库)
|
||||||
|
# - Redis 6.2 (缓存)
|
||||||
|
# - Weaviate (向量数据库)
|
||||||
|
# - MinIO (对象存储)
|
||||||
|
# - RuoYi-Backend (后端服务,源码编译)
|
||||||
|
|
||||||
|
services:
|
||||||
|
# MySQL 数据库
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0.33
|
||||||
|
container_name: ruoyi-ai-mysql
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "23306:3306"
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: ruoyi-ai-agent
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
volumes:
|
||||||
|
- ../../script/sql/ruoyi-ai.sql:/docker-entrypoint-initdb.d/01-ruoyi-ai.sql:ro
|
||||||
|
- ../../script/sql/snail_job_mysql.sql:/docker-entrypoint-initdb.d/02-snail-job.sql:ro
|
||||||
|
- mysql-data:/var/lib/mysql
|
||||||
|
command:
|
||||||
|
--default-authentication-plugin=mysql_native_password
|
||||||
|
--character-set-server=utf8mb4
|
||||||
|
--collation-server=utf8mb4_general_ci
|
||||||
|
--explicit_defaults_for_timestamp=true
|
||||||
|
--lower_case_table_names=1
|
||||||
|
--skip-ssl
|
||||||
|
healthcheck:
|
||||||
|
# Do not let the socket-only initialization server satisfy the check.
|
||||||
|
# The backend connects over TCP and must wait for that listener.
|
||||||
|
test: ["CMD", "mysqladmin", "ping", "--protocol=tcp", "-h", "127.0.0.1", "-u", "root", "-proot"]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 60s
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# Redis 缓存
|
||||||
|
redis:
|
||||||
|
image: redis:6.2
|
||||||
|
container_name: ruoyi-ai-redis
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
volumes:
|
||||||
|
- redis-data:/data
|
||||||
|
command: redis-server --appendonly yes
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# Weaviate 向量数据库
|
||||||
|
weaviate:
|
||||||
|
image: semitechnologies/weaviate:1.30.0
|
||||||
|
container_name: ruoyi-ai-weaviate
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "28080:8080"
|
||||||
|
environment:
|
||||||
|
QUERY_DEFAULTS_LIMIT: 25
|
||||||
|
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: true
|
||||||
|
PERSISTENCE_DATA_PATH: /var/lib/weaviate
|
||||||
|
DEFAULT_VECTORIZER_MODULE: none
|
||||||
|
ENABLE_MODULES: text2vec-cohere,text2vec-huggingface,text2vec-palm,text2vec-openai,generative-openai,generative-cohere,generative-palm,ref2vec-centroid,reranker-cohere,qna-openai
|
||||||
|
CLUSTER_HOSTNAME: node1
|
||||||
|
volumes:
|
||||||
|
- weaviate-data:/var/lib/weaviate
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# MinIO 对象存储
|
||||||
|
minio:
|
||||||
|
image: minio/minio
|
||||||
|
container_name: ruoyi-ai-minio
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "9000:9000"
|
||||||
|
- "9090:9090"
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: ruoyi
|
||||||
|
MINIO_ROOT_PASSWORD: ruoyi123
|
||||||
|
volumes:
|
||||||
|
- minio-data:/data
|
||||||
|
command: server /data --console-address ":9090"
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
# RuoYi-AI 后端服务 (源码编译)
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.backend
|
||||||
|
container_name: ruoyi-ai-backend
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "26039:6039"
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
# MySQL 配置
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_PRIMARY: master
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_DRIVERCLASSNAME: com.mysql.cj.jdbc.Driver
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: jdbc:mysql://mysql:3306/ruoyi-ai-agent?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: root
|
||||||
|
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: root
|
||||||
|
# Redis 配置
|
||||||
|
SPRING_DATA_REDIS_HOST: redis
|
||||||
|
SPRING_DATA_REDIS_PORT: 6379
|
||||||
|
SPRING_DATA_REDIS_DATABASE: 0
|
||||||
|
# 日志配置
|
||||||
|
LOGGING_LEVEL_ORG_RUOYI: info
|
||||||
|
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK: warn
|
||||||
|
SYS_UPLOAD_PATH: /ruoyi/upload # 新增:对应 sys.upload.path
|
||||||
|
volumes:
|
||||||
|
- logs-data:/ruoyi/server/logs
|
||||||
|
- upload-data:/ruoyi/upload
|
||||||
|
depends_on:
|
||||||
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_started
|
||||||
|
networks:
|
||||||
|
- ruoyi-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
ruoyi-net:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
# 数据卷 支持手动指定 空为默认值
|
||||||
|
volumes:
|
||||||
|
mysql-data:
|
||||||
|
redis-data:
|
||||||
|
weaviate-data:
|
||||||
|
minio-data:
|
||||||
|
logs-data:
|
||||||
|
upload-data:
|
||||||
25
docs/docker/weaviate/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
weaviate:
|
||||||
|
command:
|
||||||
|
- --host
|
||||||
|
- 0.0.0.0
|
||||||
|
- --port
|
||||||
|
- '8080'
|
||||||
|
- --scheme
|
||||||
|
- http
|
||||||
|
image: semitechnologies/weaviate:1.30.0
|
||||||
|
ports:
|
||||||
|
- 28080:8080
|
||||||
|
- 50051:50051
|
||||||
|
volumes:
|
||||||
|
- weaviate_data:/var/lib/weaviate
|
||||||
|
environment:
|
||||||
|
QUERY_DEFAULTS_LIMIT: 25
|
||||||
|
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
|
||||||
|
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
|
||||||
|
DEFAULT_VECTORIZER_MODULE: 'none'
|
||||||
|
CLUSTER_HOSTNAME: 'node1'
|
||||||
|
volumes:
|
||||||
|
weaviate_data:
|
||||||
|
...
|
||||||
BIN
docs/image/01.png
Normal file
|
After Width: | Height: | Size: 298 KiB |
BIN
docs/image/02.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
docs/image/03.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
docs/image/bibi.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
docs/image/dy.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
docs/image/sponsor/atlascloud_banner.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
docs/image/sponsor/huoshan.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
docs/image/wx06.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
@@ -1,161 +0,0 @@
|
|||||||
worker_processes 1;
|
|
||||||
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
# 可以根据业务并发量适当调高
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
# 高效传输文件
|
|
||||||
sendfile on;
|
|
||||||
# 长连接超时时间
|
|
||||||
keepalive_timeout 65;
|
|
||||||
# 单连接最大请求数,提高长连接复用率
|
|
||||||
keepalive_requests 100000;
|
|
||||||
# 限制body大小
|
|
||||||
client_max_body_size 100m;
|
|
||||||
client_header_buffer_size 32k;
|
|
||||||
client_body_buffer_size 512k;
|
|
||||||
# 开启静态资源压缩
|
|
||||||
gzip_static on;
|
|
||||||
# 连接数限制 (防御类配置) 10m 一般够用了,能存储上万 IP 的计数
|
|
||||||
limit_conn_zone $binary_remote_addr zone=perip:10m;
|
|
||||||
limit_conn_zone $server_name zone=perserver:10m;
|
|
||||||
# 隐藏 nginx 版本号,防止暴露版本信息
|
|
||||||
server_tokens off;
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
|
|
||||||
upstream server {
|
|
||||||
ip_hash;
|
|
||||||
server 127.0.0.1:8080;
|
|
||||||
server 127.0.0.1:8081;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream monitor-admin {
|
|
||||||
server 127.0.0.1:9090;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream snailjob-server {
|
|
||||||
server 127.0.0.1:8800;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
# https配置参考 start
|
|
||||||
#listen 443 ssl;
|
|
||||||
|
|
||||||
# 证书直接存放 /docker/nginx/cert/ 目录下即可 更改证书名称即可 无需更改证书路径
|
|
||||||
#ssl on;
|
|
||||||
#ssl_certificate /etc/nginx/cert/xxx.local.crt; # /etc/nginx/cert/ 为docker映射路径 不允许更改
|
|
||||||
#ssl_certificate_key /etc/nginx/cert/xxx.local.key; # /etc/nginx/cert/ 为docker映射路径 不允许更改
|
|
||||||
#ssl_session_timeout 5m;
|
|
||||||
#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
|
||||||
#ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1 TLSv1;
|
|
||||||
#ssl_prefer_server_ciphers on;
|
|
||||||
# https配置参考 end
|
|
||||||
|
|
||||||
# 演示环境配置 拦截除 GET POST 之外的所有请求
|
|
||||||
# if ($request_method !~* GET|POST) {
|
|
||||||
# rewrite ^/(.*)$ /403;
|
|
||||||
# }
|
|
||||||
|
|
||||||
# location = /403 {
|
|
||||||
# default_type application/json;
|
|
||||||
# return 200 '{"msg":"演示模式,不允许操作","code":500}';
|
|
||||||
# }
|
|
||||||
|
|
||||||
# 限制外网访问内网 actuator 相关路径
|
|
||||||
location ~ ^(/[^/]*)?/actuator.*(/.*)?$ {
|
|
||||||
return 403;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html; # docker映射路径 不允许更改
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
index index.html index.htm;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /prod-api/ {
|
|
||||||
# 设置客户端请求头中的 Host 信息(保持原始 Host)
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
# 获取客户端真实 IP
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
# 自定义头 REMOTE-HOST,记录客户端 IP
|
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
|
||||||
# 获取完整的客户端 IP 链(经过多级代理时)
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
# 设置后端响应超时时间(这里是 24 小时,适合长连接/SSE)
|
|
||||||
proxy_read_timeout 86400s;
|
|
||||||
# SSE (Server-Sent Events) 与 WebSocket 支持参数
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
# 禁用代理缓冲,数据直接传给客户端
|
|
||||||
proxy_buffering off;
|
|
||||||
# 禁用代理缓存
|
|
||||||
proxy_cache off;
|
|
||||||
# 按 IP 限制连接数(防 CC 攻击) 小型站:10~20 就够 中型站:50~100
|
|
||||||
limit_conn perip 20;
|
|
||||||
|
|
||||||
# 按 Server 限制总并发连接数 根据服务器的最大并发处理能力来定 太小会限制合法用户访问,太大会占满服务器资源
|
|
||||||
limit_conn perserver 500;
|
|
||||||
proxy_pass http://server/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# https 会拦截内链所有的 http 请求 造成功能无法使用
|
|
||||||
# 解决方案1 将 admin 服务 也配置成 https
|
|
||||||
# 解决方案2 将菜单配置为外链访问 走独立页面 http 访问
|
|
||||||
location /admin/ {
|
|
||||||
# 设置客户端请求头中的 Host 信息(保持原始 Host)
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
# 获取客户端真实 IP
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
# 自定义头 REMOTE-HOST,记录客户端 IP
|
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
|
||||||
# 获取完整的客户端 IP 链(经过多级代理时)
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
# 禁用代理缓冲,数据直接传给客户端
|
|
||||||
proxy_buffering off;
|
|
||||||
# 禁用代理缓存
|
|
||||||
proxy_cache off;
|
|
||||||
proxy_pass http://monitor-admin/admin/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /snail-job/ {
|
|
||||||
# 设置客户端请求头中的 Host 信息(保持原始 Host)
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
# 获取客户端真实 IP
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
# 自定义头 REMOTE-HOST,记录客户端 IP
|
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
|
||||||
# 获取完整的客户端 IP 链(经过多级代理时)
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
# SSE (Server-Sent Events) 与 WebSocket 支持参数
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
# 禁用代理缓冲,直接传输给客户端
|
|
||||||
proxy_buffering off;
|
|
||||||
# 禁用代理缓存
|
|
||||||
proxy_cache off;
|
|
||||||
proxy_pass http://snailjob-server/snail-job/;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# redis 密码
|
|
||||||
requirepass ruoyi123
|
|
||||||
|
|
||||||
# key 监听器配置
|
|
||||||
# notify-keyspace-events Ex
|
|
||||||
|
|
||||||
# 配置持久化文件存储路径
|
|
||||||
dir /redis/data
|
|
||||||
# 配置rdb
|
|
||||||
# 15分钟内有至少1个key被更改则进行快照
|
|
||||||
save 900 1
|
|
||||||
# 5分钟内有至少10个key被更改则进行快照
|
|
||||||
save 300 10
|
|
||||||
# 1分钟内有至少10000个key被更改则进行快照
|
|
||||||
save 60 10000
|
|
||||||
# 开启压缩
|
|
||||||
rdbcompression yes
|
|
||||||
# rdb文件名 用默认的即可
|
|
||||||
dbfilename dump.rdb
|
|
||||||
|
|
||||||
# 开启aof
|
|
||||||
appendonly yes
|
|
||||||
# 文件名
|
|
||||||
appendfilename "appendonly.aof"
|
|
||||||
# 持久化策略,no:不同步,everysec:每秒一次,always:总是同步,速度比较慢
|
|
||||||
# appendfsync always
|
|
||||||
appendfsync everysec
|
|
||||||
# appendfsync no
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
数据目录 请执行 `chmod 777 /docker/redis/data` 赋予读写权限 否则将无法写入数据
|
|
||||||
86
docs/script/install-ffmpeg-windows.ps1
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
function Find-Executable([string]$Name) {
|
||||||
|
$command = Get-Command $Name -ErrorAction SilentlyContinue
|
||||||
|
if ($command) {
|
||||||
|
return $command.Source
|
||||||
|
}
|
||||||
|
|
||||||
|
$roots = @(
|
||||||
|
(Join-Path $env:LOCALAPPDATA 'Microsoft\WinGet\Packages'),
|
||||||
|
(Join-Path $env:USERPROFILE 'scoop\apps\ffmpeg'),
|
||||||
|
'C:\ProgramData\chocolatey\bin',
|
||||||
|
'C:\ffmpeg'
|
||||||
|
)
|
||||||
|
foreach ($root in $roots) {
|
||||||
|
if (-not (Test-Path $root)) { continue }
|
||||||
|
$match = Get-ChildItem -Path $root -Filter "$Name.exe" -Recurse -ErrorAction SilentlyContinue |
|
||||||
|
Select-Object -First 1 -ExpandProperty FullName
|
||||||
|
if ($match) { return $match }
|
||||||
|
}
|
||||||
|
return $null
|
||||||
|
}
|
||||||
|
|
||||||
|
$ffmpeg = Find-Executable 'ffmpeg'
|
||||||
|
$ffprobe = Find-Executable 'ffprobe'
|
||||||
|
|
||||||
|
if ($Force -or -not $ffmpeg -or -not $ffprobe) {
|
||||||
|
$winget = Get-Command winget -ErrorAction SilentlyContinue
|
||||||
|
if (-not $winget) {
|
||||||
|
throw '未找到 winget。请先从 Microsoft Store 安装“应用安装程序”,或使用项目 Dockerfile 运行后端。'
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host '正在通过 winget 安装 FFmpeg...' -ForegroundColor Cyan
|
||||||
|
& winget install --id Gyan.FFmpeg --exact --source winget `
|
||||||
|
--accept-package-agreements --accept-source-agreements
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "winget 安装失败,退出码: $LASTEXITCODE"
|
||||||
|
}
|
||||||
|
|
||||||
|
$ffmpeg = Find-Executable 'ffmpeg'
|
||||||
|
$ffprobe = Find-Executable 'ffprobe'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $ffmpeg -or -not $ffprobe) {
|
||||||
|
throw 'FFmpeg 已安装但未能定位 ffmpeg.exe 或 ffprobe.exe。请重新打开 PowerShell 后再次运行脚本。'
|
||||||
|
}
|
||||||
|
|
||||||
|
$binDirectory = Split-Path -Parent $ffmpeg
|
||||||
|
[Environment]::SetEnvironmentVariable('FFMPEG_PATH', $ffmpeg, 'User')
|
||||||
|
[Environment]::SetEnvironmentVariable('FFPROBE_PATH', $ffprobe, 'User')
|
||||||
|
|
||||||
|
$userPath = [Environment]::GetEnvironmentVariable('Path', 'User')
|
||||||
|
$pathParts = @($userPath -split ';' | Where-Object { $_ })
|
||||||
|
if ($pathParts -notcontains $binDirectory) {
|
||||||
|
$newPath = (@($pathParts) + $binDirectory) -join ';'
|
||||||
|
[Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
|
||||||
|
}
|
||||||
|
|
||||||
|
$env:FFMPEG_PATH = $ffmpeg
|
||||||
|
$env:FFPROBE_PATH = $ffprobe
|
||||||
|
if (($env:Path -split ';') -notcontains $binDirectory) {
|
||||||
|
$env:Path = "$binDirectory;$env:Path"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "ffmpeg: $ffmpeg" -ForegroundColor Green
|
||||||
|
Write-Host "ffprobe: $ffprobe" -ForegroundColor Green
|
||||||
|
|
||||||
|
& $ffmpeg -hide_banner -version | Select-Object -First 1
|
||||||
|
& $ffprobe -hide_banner -version | Select-Object -First 1
|
||||||
|
|
||||||
|
$encoders = & $ffmpeg -hide_banner -encoders 2>&1 | Out-String
|
||||||
|
if ($encoders -notmatch '\blibx264\b') {
|
||||||
|
throw '当前 FFmpeg 不包含 libx264 编码器,无法满足短剧合成配置。'
|
||||||
|
}
|
||||||
|
if ($encoders -notmatch '\baac\b') {
|
||||||
|
throw '当前 FFmpeg 不包含 AAC 编码器,无法满足短剧合成配置。'
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host ''
|
||||||
|
Write-Host '安装与配置完成。请完全重启 IntelliJ IDEA 和 ruoyi-ai 后端服务。' -ForegroundColor Yellow
|
||||||
|
Write-Host '重启后,Spring 将从 FFMPEG_PATH 和 FFPROBE_PATH 读取绝对路径。'
|
||||||
545
docs/script/sql/snail_job_mysql.sql
Normal file
58
docs/script/sql/update/2026-07-20-knowledge-fragment-fid.sql
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
-- RAG metadata migration (MySQL 8). Safe to execute repeatedly.
|
||||||
|
-- 注意:MySQL 8 不支持 ALTER TABLE ... ADD COLUMN IF NOT EXISTS(仅 MariaDB 支持),
|
||||||
|
-- 因此列的增量添加统一用 information_schema 守卫 + PREPARE 实现幂等。
|
||||||
|
SET @add_file_hash_col = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.columns WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_attach' AND column_name = 'file_hash'),
|
||||||
|
'SELECT 1',
|
||||||
|
'ALTER TABLE `knowledge_attach` ADD COLUMN `file_hash` varchar(64) NULL DEFAULT NULL COMMENT ''文件SHA-256摘要'' AFTER `doc_id`');
|
||||||
|
PREPARE stmt FROM @add_file_hash_col; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
ALTER TABLE `knowledge_attach`
|
||||||
|
MODIFY COLUMN `doc_id` varchar(32) NULL DEFAULT NULL COMMENT '文档ID';
|
||||||
|
|
||||||
|
SET @add_file_hash = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.statistics WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_attach' AND index_name = 'uk_knowledge_file_hash'),
|
||||||
|
'SELECT 1', 'ALTER TABLE `knowledge_attach` ADD UNIQUE INDEX `uk_knowledge_file_hash` (`knowledge_id`, `file_hash`)');
|
||||||
|
PREPARE stmt FROM @add_file_hash; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
SET @add_fid_col = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.columns WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_fragment' AND column_name = 'fid'),
|
||||||
|
'SELECT 1',
|
||||||
|
'ALTER TABLE `knowledge_fragment` ADD COLUMN `fid` varchar(32) NULL DEFAULT NULL COMMENT ''向量库片段ID'' AFTER `id`');
|
||||||
|
PREPARE stmt FROM @add_fid_col; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
ALTER TABLE `knowledge_fragment`
|
||||||
|
MODIFY COLUMN `doc_id` varchar(32) NULL DEFAULT NULL COMMENT '文档ID';
|
||||||
|
|
||||||
|
UPDATE `knowledge_fragment`
|
||||||
|
SET `fid` = LOWER(MD5(CONCAT('knowledge_fragment:', `id`)))
|
||||||
|
WHERE `fid` IS NULL OR `fid` = '';
|
||||||
|
|
||||||
|
SET @drop_idx_fid = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.statistics WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_fragment' AND index_name = 'idx_fid'),
|
||||||
|
'ALTER TABLE `knowledge_fragment` DROP INDEX `idx_fid`', 'SELECT 1');
|
||||||
|
PREPARE stmt FROM @drop_idx_fid; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
SET @add_uk_fid = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.statistics WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_fragment' AND index_name = 'uk_fid'),
|
||||||
|
'SELECT 1', 'ALTER TABLE `knowledge_fragment` ADD UNIQUE INDEX `uk_fid` (`fid`)');
|
||||||
|
PREPARE stmt FROM @add_uk_fid; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
ALTER TABLE `knowledge_fragment` MODIFY COLUMN `fid` varchar(32) NOT NULL COMMENT '向量库片段ID';
|
||||||
|
|
||||||
|
SET @add_tenant_user = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.statistics WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_info' AND index_name = 'idx_tenant_user'),
|
||||||
|
'SELECT 1', 'ALTER TABLE `knowledge_info` ADD INDEX `idx_tenant_user` (`tenant_id`, `user_id`)');
|
||||||
|
PREPARE stmt FROM @add_tenant_user; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
SET @add_tenant_share = IF(EXISTS(
|
||||||
|
SELECT 1 FROM information_schema.statistics WHERE table_schema = DATABASE()
|
||||||
|
AND table_name = 'knowledge_info' AND index_name = 'idx_tenant_share'),
|
||||||
|
'SELECT 1', 'ALTER TABLE `knowledge_info` ADD INDEX `idx_tenant_share` (`tenant_id`, `share`)');
|
||||||
|
PREPARE stmt FROM @add_tenant_share; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- 加宽 chat_provider.provider_icon 字段 (对应 issue IHPUDA)
|
||||||
|
-- 背景:文件系统使用 minio 私有桶时,厂商图标存的是带签名的临时访问 URL,
|
||||||
|
-- 长度常超过 255,导致「Data too long for column 'provider_icon'」。
|
||||||
|
-- MODIFY COLUMN 可重复执行。
|
||||||
|
|
||||||
|
ALTER TABLE `chat_provider`
|
||||||
|
MODIFY COLUMN `provider_icon` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '厂商图标';
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
-- 补充工作流节点消息模板配置 (对应 issue IJX5VV)
|
||||||
|
-- 背景:NodeMessageTemplateEnum 依赖以下 7 个 sys_config 键,缺失时
|
||||||
|
-- WorkflowMessageUtil.getNodeMessageTemplate 会抛出「请先配置该节点的响应模板」。
|
||||||
|
-- 这批配置在历史提交 20d531c0 中存在,SQL 脚本合并重命名时遗失,此处恢复。
|
||||||
|
-- 幂等:按 config_key + tenant_id 判重,可重复执行。
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027192921483309058, '000000', 'HTTP请求节点响应模板', 'node.httpRequest.template', '✅ HTTP请求节点:结束响应 - ', 'Y', 103, 1, '2026-02-27 09:23:51', 1, '2026-02-27 09:31:41', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.httpRequest.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027193296990957569, '000000', '文生图节点响应模板', 'node.image.template', '🎨 文生图节点:结束响应 - 图片URL: ', 'Y', 103, 1, '2026-02-27 09:25:20', 1, '2026-02-27 09:31:52', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.image.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027193820393959425, '000000', '发送邮箱节点响应模板', 'node.mailsend.template', '📧 发送邮箱节点:结束响应 - ', 'Y', 103, 1, '2026-02-27 09:27:25', 1, '2026-02-27 09:32:05', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.mailsend.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027194134438277122, '000000', '结束节点响应模板', 'node.end.template', '🔚 流程已执行完毕,如果您有其他需求,请随时重新发起请求。', 'Y', 103, 1, '2026-02-27 09:28:40', 1, '2026-02-27 09:32:53', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.end.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027208880369647617, '000000', '条件分支节点响应模板', 'node.switch.template', '🔀 条件分支节点:触发 -> 跳转到节点 ', 'Y', 103, 1, '2026-02-27 10:27:15', 1, '2026-02-27 10:35:54', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.switch.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027213914603995137, '000000', '大模型回答节点响应模板', 'node.llmAnswer.template', '🤖 LLM 节点 生成回答:', 'Y', 103, 1, '2026-02-27 10:47:16', 1, '2026-02-27 10:52:40', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.llmAnswer.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027217577397391361, '000000', '工作流异常响应模板', 'node.exception.template', '🛑 工作流发生异常:', 'N', 103, 1, '2026-02-27 11:01:49', 1, '2026-02-27 11:02:01', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.exception.template' AND `tenant_id` = '000000');
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
-- 注册链路修复:补齐缺失的菜单权限标识 + 新建注册默认角色
|
||||||
|
-- 关联问题:
|
||||||
|
-- #3 注册用户无默认角色 -> 无权限访问 AI 对话界面
|
||||||
|
-- #4 sys_menu 缺 system:session:* / system:attach:* / system:fragment:*,
|
||||||
|
-- 且 知识管理 父菜单 perms 为 knowledge:info:list,与控制器
|
||||||
|
-- KnowledgeInfoController 用的 system:info:list 对不上,:list 无法授权。
|
||||||
|
-- 本脚本幂等,可重复执行(INSERT IGNORE + UPDATE 天然幂等)。
|
||||||
|
-- 新增 menu_id / role_id / config_id 统一使用 2099010100000000xxx 段,
|
||||||
|
-- 与现有 snowflake id(2xxxxxxxxxxxxxxxxx)不冲突。
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 1. 修正 知识管理 父菜单权限标识:knowledge:info:list -> system:info:list
|
||||||
|
-- ============================================================
|
||||||
|
UPDATE `sys_menu`
|
||||||
|
SET `perms` = 'system:info:list'
|
||||||
|
WHERE `menu_id` = 2006681261898813441 AND `perms` = 'knowledge:info:list';
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 2. 新增 会话管理 菜单组(system:session:*)
|
||||||
|
-- 父菜单=对话管理(2000209300188356609)。
|
||||||
|
-- 管理端暂无 chat/session 页面,故 C 菜单设为隐藏(visible=1),
|
||||||
|
-- 权限标识仍可在角色管理中授权给用户端使用。
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES
|
||||||
|
(2099010100000000001, '会话管理', 2000209300188356609, 6, 'session', NULL, NULL, 1, 0, 'C', '1', '0', 'system:session:list', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '会话管理菜单'),
|
||||||
|
(2099010100000000002, '会话管理查询', 2099010100000000001, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:session:query', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000003, '会话管理新增', 2099010100000000001, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:session:add', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000004, '会话管理修改', 2099010100000000001, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:session:edit', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000005, '会话管理删除', 2099010100000000001, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:session:remove', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000006, '会话管理导出', 2099010100000000001, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:session:export', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '');
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 3. 新增 知识附件 菜单组(system:attach:*)
|
||||||
|
-- 父菜单=对话管理(2000209300188356609),组件对应管理端 knowledge/attach/index。
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES
|
||||||
|
(2099010100000000010, '知识附件', 2000209300188356609, 7, 'attach', 'knowledge/attach/index', NULL, 1, 0, 'C', '0', '0', 'system:attach:list', 'ant-design:paper-clip-outlined', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '知识附件菜单'),
|
||||||
|
(2099010100000000011, '知识附件查询', 2099010100000000010, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:attach:query', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000012, '知识附件新增', 2099010100000000010, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:attach:add', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000013, '知识附件修改', 2099010100000000010, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:attach:edit', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000014, '知识附件删除', 2099010100000000010, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:attach:remove', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000015, '知识附件导出', 2099010100000000010, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:attach:export', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '');
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 4. 新增 知识片段 菜单组(system:fragment:*)
|
||||||
|
-- 父菜单=对话管理(2000209300188356609),组件对应管理端 knowledge/fragment/index。
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES
|
||||||
|
(2099010100000000020, '知识片段', 2000209300188356609, 8, 'fragment', 'knowledge/fragment/index', NULL, 1, 0, 'C', '0', '0', 'system:fragment:list', 'ant-design:file-text-outlined', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '知识片段菜单'),
|
||||||
|
(2099010100000000021, '知识片段查询', 2099010100000000020, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:fragment:query', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000022, '知识片段新增', 2099010100000000020, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:fragment:add', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000023, '知识片段修改', 2099010100000000020, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:fragment:edit', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000024, '知识片段删除', 2099010100000000020, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:fragment:remove', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, ''),
|
||||||
|
(2099010100000000025, '知识片段导出', 2099010100000000020, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:fragment:export', '#', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '');
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 5. 新建 普通用户 角色(租户 000000,data_scope=5 仅本人)
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_role` VALUES
|
||||||
|
(2099010100000000030, '000000', '普通用户', 'user', 2, '5', 1, 1, '0', '0', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '注册用户默认角色');
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 6. 角色-菜单关联:普通用户 拥有用户端 AI 对话所需权限
|
||||||
|
-- 会话管理(001-006) + 聊天消息(2000210914680823809 及 810-814)
|
||||||
|
-- + 知识管理(2006681261898813441 及 442-446)
|
||||||
|
-- + 知识附件(010-015) + 知识片段(020-025)
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES
|
||||||
|
-- 会话管理
|
||||||
|
(2099010100000000030, 2099010100000000001),
|
||||||
|
(2099010100000000030, 2099010100000000002),
|
||||||
|
(2099010100000000030, 2099010100000000003),
|
||||||
|
(2099010100000000030, 2099010100000000004),
|
||||||
|
(2099010100000000030, 2099010100000000005),
|
||||||
|
(2099010100000000030, 2099010100000000006),
|
||||||
|
-- 聊天消息
|
||||||
|
(2099010100000000030, 2000210914680823809),
|
||||||
|
(2099010100000000030, 2000210914680823810),
|
||||||
|
(2099010100000000030, 2000210914680823811),
|
||||||
|
(2099010100000000030, 2000210914680823812),
|
||||||
|
(2099010100000000030, 2000210914680823813),
|
||||||
|
(2099010100000000030, 2000210914680823814),
|
||||||
|
-- 知识管理
|
||||||
|
(2099010100000000030, 2006681261898813441),
|
||||||
|
(2099010100000000030, 2006681261898813442),
|
||||||
|
(2099010100000000030, 2006681261898813443),
|
||||||
|
(2099010100000000030, 2006681261898813444),
|
||||||
|
(2099010100000000030, 2006681261898813445),
|
||||||
|
(2099010100000000030, 2006681261898813446),
|
||||||
|
-- 知识附件
|
||||||
|
(2099010100000000030, 2099010100000000010),
|
||||||
|
(2099010100000000030, 2099010100000000011),
|
||||||
|
(2099010100000000030, 2099010100000000012),
|
||||||
|
(2099010100000000030, 2099010100000000013),
|
||||||
|
(2099010100000000030, 2099010100000000014),
|
||||||
|
(2099010100000000030, 2099010100000000015),
|
||||||
|
-- 知识片段
|
||||||
|
(2099010100000000030, 2099010100000000020),
|
||||||
|
(2099010100000000030, 2099010100000000021),
|
||||||
|
(2099010100000000030, 2099010100000000022),
|
||||||
|
(2099010100000000030, 2099010100000000023),
|
||||||
|
(2099010100000000030, 2099010100000000024),
|
||||||
|
(2099010100000000030, 2099010100000000025);
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 7. 注册默认角色配置项 sys.register.defaultRoleId
|
||||||
|
-- 后端 SysRegisterService 注册成功后读取此配置为新用户绑定角色;
|
||||||
|
-- 值为空字符串时不绑定(保留旧行为)。
|
||||||
|
-- ============================================================
|
||||||
|
INSERT IGNORE INTO `sys_config` VALUES
|
||||||
|
(2099010100000000031, '000000', '注册-默认角色ID', 'sys.register.defaultRoleId', '2099010100000000030', 'Y', 103, 1, '2026-07-24 00:00:00', NULL, NULL, '新注册用户绑定的默认角色ID,留空则不绑定');
|
||||||
|
|
||||||
|
-- ============================================================
|
||||||
|
-- 8. 前置条件(运营项,默认不执行):开启用户注册
|
||||||
|
-- sys.account.registerUser 默认 false,后端 AuthController.register
|
||||||
|
-- 会据此返回「当前系统没有开启注册功能」。若要开放注册,取消注释执行。
|
||||||
|
-- ============================================================
|
||||||
|
-- UPDATE `sys_config` SET `config_value` = 'true'
|
||||||
|
-- WHERE `config_key` = 'sys.account.registerUser' AND `tenant_id` = '000000';
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
-- 一次性补全工作流节点消息模板配置 (NodeMessageTemplateEnum 全部 8 个键)
|
||||||
|
-- 背景:节点执行时 WorkflowMessageUtil.getNodeMessageTemplate 从 sys_config 读取展示模板,
|
||||||
|
-- 历史库中这批配置缺失, 导致运行工作流抛「请先配置该节点的响应模板」。
|
||||||
|
-- 其中前 7 个见 2026-07-21-sys-config-node-template.sql,
|
||||||
|
-- Google Search 为此前从未入库的节点模板。
|
||||||
|
-- 说明:代码已增加内置默认模板兜底, 本脚本为可选, 执行后模板可在 系统管理-配置管理 中自定义。
|
||||||
|
-- 幂等:按 config_key + tenant_id 判重, 可重复执行。
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027192921483309058, '000000', 'HTTP请求节点响应模板', 'node.httpRequest.template', '✅ HTTP请求节点:结束响应 - ', 'Y', 103, 1, '2026-02-27 09:23:51', 1, '2026-02-27 09:31:41', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.httpRequest.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027193296990957569, '000000', '文生图节点响应模板', 'node.image.template', '🎨 文生图节点:结束响应 - 图片URL: ', 'Y', 103, 1, '2026-02-27 09:25:20', 1, '2026-02-27 09:31:52', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.image.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027193820393959425, '000000', '发送邮箱节点响应模板', 'node.mailsend.template', '📧 发送邮箱节点:结束响应 - ', 'Y', 103, 1, '2026-02-27 09:27:25', 1, '2026-02-27 09:32:05', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.mailsend.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027194134438277122, '000000', '结束节点响应模板', 'node.end.template', '🔚 流程已执行完毕,如果您有其他需求,请随时重新发起请求。', 'Y', 103, 1, '2026-02-27 09:28:40', 1, '2026-02-27 09:32:53', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.end.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027208880369647617, '000000', '条件分支节点响应模板', 'node.switch.template', '🔀 条件分支节点:触发 -> 跳转到节点 ', 'Y', 103, 1, '2026-02-27 10:27:15', 1, '2026-02-27 10:35:54', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.switch.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027213914603995137, '000000', '大模型回答节点响应模板', 'node.llmAnswer.template', '🤖 LLM 节点 生成回答:', 'Y', 103, 1, '2026-02-27 10:47:16', 1, '2026-02-27 10:52:40', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.llmAnswer.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2027217577397391361, '000000', '工作流异常响应模板', 'node.exception.template', '🛑 工作流发生异常:', 'N', 103, 1, '2026-02-27 11:01:49', 1, '2026-02-27 11:02:01', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.exception.template' AND `tenant_id` = '000000');
|
||||||
|
|
||||||
|
INSERT INTO `sys_config` (`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_dept`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||||
|
SELECT 2084157200000000003, '000000', '网络搜索节点响应模板', 'node.googleSearch.template', '🔍 网络搜索节点处理完成:', 'Y', 103, 1, '2026-07-29 19:40:00', 1, '2026-07-29 19:40:00', NULL
|
||||||
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_config` WHERE `config_key` = 'node.googleSearch.template' AND `tenant_id` = '000000');
|
||||||
66
docs/script/sql/update/2026-07-29-zhipu-web-search-node.sql
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
-- 智谱 Web Search 工作流扩展节点
|
||||||
|
-- 内部组件名继续使用 Google,以兼容现有前端组件和已保存流程。
|
||||||
|
|
||||||
|
UPDATE `t_workflow_component`
|
||||||
|
SET `title` = '网络搜索',
|
||||||
|
`remark` = '调用智谱 Web Search 检索互联网信息',
|
||||||
|
`display_order` = 40,
|
||||||
|
`is_enable` = 1,
|
||||||
|
`is_deleted` = 0,
|
||||||
|
`update_time` = NOW()
|
||||||
|
WHERE `name` = 'Google'
|
||||||
|
AND `tenant_id` = '000000';
|
||||||
|
|
||||||
|
INSERT INTO `t_workflow_component`
|
||||||
|
(`uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`,
|
||||||
|
`create_time`, `update_time`, `is_deleted`, `tenant_id`)
|
||||||
|
SELECT
|
||||||
|
'a7f8c2d44e5b4c83a9d6f103c2b47e18',
|
||||||
|
'Google',
|
||||||
|
'网络搜索',
|
||||||
|
'调用智谱 Web Search 检索互联网信息',
|
||||||
|
40,
|
||||||
|
1,
|
||||||
|
NOW(),
|
||||||
|
NOW(),
|
||||||
|
0,
|
||||||
|
'000000'
|
||||||
|
FROM DUAL
|
||||||
|
WHERE NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM `t_workflow_component`
|
||||||
|
WHERE `name` = 'Google'
|
||||||
|
AND `tenant_id` = '000000'
|
||||||
|
);
|
||||||
|
|
||||||
|
UPDATE `sys_config`
|
||||||
|
SET `config_name` = '网络搜索节点响应模板',
|
||||||
|
`config_value` = '🔍 网络搜索节点处理完成:',
|
||||||
|
`update_time` = NOW()
|
||||||
|
WHERE `config_key` = 'node.googleSearch.template'
|
||||||
|
AND `tenant_id` = '000000';
|
||||||
|
|
||||||
|
INSERT INTO `sys_config`
|
||||||
|
(`config_id`, `tenant_id`, `config_name`, `config_key`, `config_value`,
|
||||||
|
`config_type`, `create_dept`, `create_by`, `create_time`, `update_by`,
|
||||||
|
`update_time`, `remark`)
|
||||||
|
SELECT
|
||||||
|
2084157200000000003,
|
||||||
|
'000000',
|
||||||
|
'网络搜索节点响应模板',
|
||||||
|
'node.googleSearch.template',
|
||||||
|
'🔍 网络搜索节点处理完成:',
|
||||||
|
'Y',
|
||||||
|
103,
|
||||||
|
1,
|
||||||
|
NOW(),
|
||||||
|
1,
|
||||||
|
NOW(),
|
||||||
|
'智谱 Web Search 工作流扩展节点'
|
||||||
|
FROM DUAL
|
||||||
|
WHERE NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM `sys_config`
|
||||||
|
WHERE `config_key` = 'node.googleSearch.template'
|
||||||
|
AND `tenant_id` = '000000'
|
||||||
|
);
|
||||||
128
docs/script/sql/update/update-0615-trace.sql
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
-- 链路追踪运行记录表
|
||||||
|
CREATE TABLE IF NOT EXISTS `trace_run` (
|
||||||
|
`id` bigint NOT NULL COMMENT '主键',
|
||||||
|
`trace_id` varchar(64) NOT NULL COMMENT '链路ID',
|
||||||
|
`trace_name` varchar(128) NOT NULL COMMENT '链路名称',
|
||||||
|
`business_type` varchar(64) NOT NULL COMMENT '业务类型',
|
||||||
|
`business_id` varchar(128) DEFAULT NULL COMMENT '业务ID',
|
||||||
|
`user_id` bigint DEFAULT NULL COMMENT '用户ID',
|
||||||
|
`tenant_id` varchar(20) DEFAULT '000000' COMMENT '租户编号',
|
||||||
|
`status` varchar(32) NOT NULL COMMENT '状态',
|
||||||
|
`start_time` datetime NOT NULL COMMENT '开始时间',
|
||||||
|
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
|
||||||
|
`duration_ms` bigint DEFAULT NULL COMMENT '耗时毫秒',
|
||||||
|
`error_message` varchar(1000) DEFAULT NULL COMMENT '错误摘要',
|
||||||
|
`metadata` text DEFAULT NULL COMMENT '元数据JSON',
|
||||||
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
||||||
|
`create_by` bigint DEFAULT NULL COMMENT '创建者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_by` bigint DEFAULT NULL COMMENT '更新者',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uk_trace_run_trace_id` (`trace_id`) USING BTREE,
|
||||||
|
KEY `idx_trace_run_business` (`business_type`, `business_id`) USING BTREE,
|
||||||
|
KEY `idx_trace_run_status_time` (`status`, `start_time`) USING BTREE,
|
||||||
|
KEY `idx_trace_run_tenant_time` (`tenant_id`, `start_time`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='链路追踪运行记录表' ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
-- 链路追踪节点记录表
|
||||||
|
CREATE TABLE IF NOT EXISTS `trace_node` (
|
||||||
|
`id` bigint NOT NULL COMMENT '主键',
|
||||||
|
`trace_id` varchar(64) NOT NULL COMMENT '链路ID',
|
||||||
|
`node_id` varchar(64) NOT NULL COMMENT '节点ID',
|
||||||
|
`tenant_id` varchar(20) DEFAULT '000000' COMMENT '租户编号',
|
||||||
|
`parent_node_id` varchar(64) DEFAULT NULL COMMENT '父节点ID',
|
||||||
|
`node_name` varchar(128) NOT NULL COMMENT '节点名称',
|
||||||
|
`node_type` varchar(64) NOT NULL COMMENT '节点类型',
|
||||||
|
`depth` int DEFAULT 0 COMMENT '节点深度',
|
||||||
|
`sort_order` int DEFAULT 0 COMMENT '排序',
|
||||||
|
`class_name` varchar(255) DEFAULT NULL COMMENT '类名',
|
||||||
|
`method_name` varchar(128) DEFAULT NULL COMMENT '方法名',
|
||||||
|
`status` varchar(32) NOT NULL COMMENT '状态',
|
||||||
|
`start_time` datetime NOT NULL COMMENT '开始时间',
|
||||||
|
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
|
||||||
|
`duration_ms` bigint DEFAULT NULL COMMENT '耗时毫秒',
|
||||||
|
`error_message` varchar(1000) DEFAULT NULL COMMENT '错误摘要',
|
||||||
|
`input_payload` text DEFAULT NULL COMMENT '输入JSON',
|
||||||
|
`output_payload` text DEFAULT NULL COMMENT '输出JSON',
|
||||||
|
`metadata` text DEFAULT NULL COMMENT '元数据JSON',
|
||||||
|
`create_dept` bigint DEFAULT NULL COMMENT '创建部门',
|
||||||
|
`create_by` bigint DEFAULT NULL COMMENT '创建者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_by` bigint DEFAULT NULL COMMENT '更新者',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
`del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `idx_trace_node_trace_id` (`trace_id`) USING BTREE,
|
||||||
|
KEY `idx_trace_node_parent` (`trace_id`, `parent_node_id`) USING BTREE,
|
||||||
|
KEY `idx_trace_node_time` (`trace_id`, `start_time`) USING BTREE,
|
||||||
|
KEY `idx_trace_node_tenant_time` (`tenant_id`, `start_time`) USING BTREE,
|
||||||
|
KEY `idx_trace_node_type_status` (`node_type`, `status`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='链路追踪节点记录表' ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
-- 兼容已存在的旧 trace 表:CREATE TABLE IF NOT EXISTS 不会给旧表补新字段
|
||||||
|
SET @trace_run_add_tenant_sql = (
|
||||||
|
SELECT IF(COUNT(*) = 0,
|
||||||
|
'ALTER TABLE `trace_run` ADD COLUMN `tenant_id` varchar(20) DEFAULT ''000000'' COMMENT ''租户编号'' AFTER `user_id`',
|
||||||
|
'SELECT 1'
|
||||||
|
)
|
||||||
|
FROM information_schema.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'trace_run'
|
||||||
|
AND COLUMN_NAME = 'tenant_id'
|
||||||
|
);
|
||||||
|
PREPARE trace_run_add_tenant_stmt FROM @trace_run_add_tenant_sql;
|
||||||
|
EXECUTE trace_run_add_tenant_stmt;
|
||||||
|
DEALLOCATE PREPARE trace_run_add_tenant_stmt;
|
||||||
|
|
||||||
|
SET @trace_run_add_tenant_idx_sql = (
|
||||||
|
SELECT IF(COUNT(*) = 0,
|
||||||
|
'ALTER TABLE `trace_run` ADD INDEX `idx_trace_run_tenant_time` (`tenant_id`, `start_time`) USING BTREE',
|
||||||
|
'SELECT 1'
|
||||||
|
)
|
||||||
|
FROM information_schema.STATISTICS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'trace_run'
|
||||||
|
AND INDEX_NAME = 'idx_trace_run_tenant_time'
|
||||||
|
);
|
||||||
|
PREPARE trace_run_add_tenant_idx_stmt FROM @trace_run_add_tenant_idx_sql;
|
||||||
|
EXECUTE trace_run_add_tenant_idx_stmt;
|
||||||
|
DEALLOCATE PREPARE trace_run_add_tenant_idx_stmt;
|
||||||
|
|
||||||
|
SET @trace_node_add_tenant_sql = (
|
||||||
|
SELECT IF(COUNT(*) = 0,
|
||||||
|
'ALTER TABLE `trace_node` ADD COLUMN `tenant_id` varchar(20) DEFAULT ''000000'' COMMENT ''租户编号'' AFTER `node_id`',
|
||||||
|
'SELECT 1'
|
||||||
|
)
|
||||||
|
FROM information_schema.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'trace_node'
|
||||||
|
AND COLUMN_NAME = 'tenant_id'
|
||||||
|
);
|
||||||
|
PREPARE trace_node_add_tenant_stmt FROM @trace_node_add_tenant_sql;
|
||||||
|
EXECUTE trace_node_add_tenant_stmt;
|
||||||
|
DEALLOCATE PREPARE trace_node_add_tenant_stmt;
|
||||||
|
|
||||||
|
SET @trace_node_add_tenant_idx_sql = (
|
||||||
|
SELECT IF(COUNT(*) = 0,
|
||||||
|
'ALTER TABLE `trace_node` ADD INDEX `idx_trace_node_tenant_time` (`tenant_id`, `start_time`) USING BTREE',
|
||||||
|
'SELECT 1'
|
||||||
|
)
|
||||||
|
FROM information_schema.STATISTICS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'trace_node'
|
||||||
|
AND INDEX_NAME = 'idx_trace_node_tenant_time'
|
||||||
|
);
|
||||||
|
PREPARE trace_node_add_tenant_idx_stmt FROM @trace_node_add_tenant_idx_sql;
|
||||||
|
EXECUTE trace_node_add_tenant_idx_stmt;
|
||||||
|
DEALLOCATE PREPARE trace_node_add_tenant_idx_stmt;
|
||||||
|
|
||||||
|
-- 链路追踪监控菜单 & 按钮权限
|
||||||
|
INSERT INTO `sys_menu`
|
||||||
|
(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `remark`)
|
||||||
|
SELECT (SELECT COALESCE(MAX(`menu_id`), 0) + 1 FROM (SELECT `menu_id` FROM `sys_menu`) t), '链路追踪', 2, 7, 'trace', 'monitor/trace/index', '', 1, 0, 'C', '0', '0', 'monitor:trace:list', 'tabler:route', 103, 1, NOW(), '链路追踪监控菜单';
|
||||||
|
|
||||||
|
INSERT INTO `sys_menu`
|
||||||
|
(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_dept`, `create_by`, `create_time`, `remark`)
|
||||||
|
SELECT (SELECT COALESCE(MAX(`menu_id`), 0) + 1 FROM (SELECT `menu_id` FROM `sys_menu`) t), '链路追踪查询', (SELECT `menu_id` FROM `sys_menu` WHERE `perms` = 'monitor:trace:list' AND `menu_type` = 'C' LIMIT 1), 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:trace:query', '#', 103, 1, NOW(), '';
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (17, '5cd68dccbbb411f0bb7840c2ba9a7fbc', 'Start', '开始', '流程由此开始', 0, 1, '2025-11-07 16:32:49', '2025-11-07 16:32:49', 0, '000000');
|
|
||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (18, '5cd6ac69bbb411f0bb7840c2ba9a7fbc', 'End', '结束', '流程由此结束', 0, 1, '2025-11-07 16:32:49', '2025-11-07 16:32:49', 0, '000000');
|
|
||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (19, '5cd6c8eabbb411f0bb7840c2ba9a7fbc', 'Answer', '生成回答', '调用大语言模型回答问题', 0, 1, '2025-11-07 16:32:49', '2025-11-07 16:32:49', 0, '000000');
|
|
||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (25, '0b4369bb60dc46d6bd84ceb4e36184dc', 'KeywordExtractor', '关键词提取', '从文本中提取关键词', 0, 1, '2025-12-26 16:30:05', '2025-12-26 16:30:05', 0, '000000');
|
|
||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (26, 'bb00fc2f52c74fec82ee3f99725b56bb', 'Switcher', '条件分支', '根据条件执行不同分支', 0, 1, '2025-12-26 16:30:46', '2025-12-26 16:30:46', 0, '000000');
|
|
||||||
INSERT INTO `mysql`.`t_workflow_component` (`id`, `uuid`, `name`, `title`, `remark`, `display_order`, `is_enable`, `create_time`, `update_time`, `is_deleted`, `tenant_id`) VALUES (36, 'f37dbcb8f0d5464d90fbb22774490a56', 'HumanFeedback', '人类', '人机沟通', 0, 1, '2025-12-30 17:37:14', '2025-12-30 17:37:14', 0, '000000');
|
|
||||||
102
pom.xml
@@ -13,7 +13,7 @@
|
|||||||
<description>全栈式AI开发平台</description>
|
<description>全栈式AI开发平台</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>3.0.0</revision>
|
<revision>3.1.0</revision>
|
||||||
<spring-boot.version>3.5.8</spring-boot.version>
|
<spring-boot.version>3.5.8</spring-boot.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
@@ -43,27 +43,34 @@
|
|||||||
<aws.sdk.version>2.28.22</aws.sdk.version>
|
<aws.sdk.version>2.28.22</aws.sdk.version>
|
||||||
<!-- SMS 配置 -->
|
<!-- SMS 配置 -->
|
||||||
<sms4j.version>3.3.5</sms4j.version>
|
<sms4j.version>3.3.5</sms4j.version>
|
||||||
<!-- 限制框架中的fastjson版本 -->
|
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
|
||||||
<!-- 面向运行时的D-ORM依赖 -->
|
<!-- 面向运行时的D-ORM依赖 -->
|
||||||
<anyline.version>8.7.2-20250603</anyline.version>
|
<anyline.version>8.7.2-20250603</anyline.version>
|
||||||
<!-- 工作流配置 -->
|
<!-- 工作流配置 -->
|
||||||
<warm-flow.version>1.8.2</warm-flow.version>
|
<warm-flow.version>1.8.2</warm-flow.version>
|
||||||
<!-- 企业微信SDK -->
|
<!-- 企业微信SDK -->
|
||||||
<weixin-java-cp.version>4.4.0</weixin-java-cp.version>
|
<weixin-java-cp.version>4.6.0</weixin-java-cp.version>
|
||||||
<!-- Jackson XML -->
|
<!-- Jackson XML -->
|
||||||
<jackson-dataformat-xml.version>2.20.1</jackson-dataformat-xml.version>
|
<jackson-dataformat-xml.version>2.18.2</jackson-dataformat-xml.version>
|
||||||
<!-- AI 相关依赖 -->
|
<!-- AI 相关依赖 -->
|
||||||
<langchain4j.version>1.11.0</langchain4j.version>
|
|
||||||
<langchain4j.community.version>1.11.0-beta19</langchain4j.community.version>
|
<langchain4j.version>1.17.2</langchain4j.version>
|
||||||
<langgraph4j.version>1.5.3</langgraph4j.version>
|
<langchain4j.beta.version>1.17.2-beta27</langchain4j.beta.version>
|
||||||
|
<langchain4j.community.version>1.17.0-beta27</langchain4j.community.version>
|
||||||
|
<langgraph4j.version>1.8.20</langgraph4j.version>
|
||||||
|
|
||||||
<weaviate.version>1.19.6</weaviate.version>
|
<weaviate.version>1.19.6</weaviate.version>
|
||||||
<dify.version>1.0.7</dify.version>
|
<dify.version>1.2.7</dify.version>
|
||||||
|
<coze.version>0.4.2</coze.version>
|
||||||
|
<!-- 智谱官方 Java SDK -->
|
||||||
|
<zai-sdk.version>0.3.5</zai-sdk.version>
|
||||||
|
|
||||||
|
<!-- gRPC 版本 - 解决 Milvus SDK 依赖冲突 -->
|
||||||
|
<grpc.version>1.62.2</grpc.version>
|
||||||
<!-- Apache Commons Compress - 用于POI处理ZIP格式 -->
|
<!-- Apache Commons Compress - 用于POI处理ZIP格式 -->
|
||||||
<commons-compress.version>1.27.1</commons-compress.version>
|
<commons-compress.version>1.27.1</commons-compress.version>
|
||||||
|
|
||||||
|
|
||||||
<avatar-generator.version>1.1.0</avatar-generator.version>
|
<avatar-generator.version>1.1.0</avatar-generator.version>
|
||||||
|
<javassist.version>3.30.2-GA</javassist.version>
|
||||||
<jsoup.version>1.21.2</jsoup.version>
|
<jsoup.version>1.21.2</jsoup.version>
|
||||||
<knife4j.version>4.4.0</knife4j.version>
|
<knife4j.version>4.4.0</knife4j.version>
|
||||||
<swagger-annotations.version>2.2.8</swagger-annotations.version>
|
<swagger-annotations.version>2.2.8</swagger-annotations.version>
|
||||||
@@ -77,7 +84,7 @@
|
|||||||
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
|
||||||
<flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
|
<flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
|
||||||
<!-- 打包默认跳过测试 -->
|
<!-- 打包默认跳过测试 -->
|
||||||
<skipTests>true</skipTests>
|
<skipTests>false</skipTests>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
@@ -129,6 +136,15 @@
|
|||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- gRPC BOM - 解决 Milvus SDK 依赖冲突,强制统一版本 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.grpc</groupId>
|
||||||
|
<artifactId>grpc-bom</artifactId>
|
||||||
|
<version>${grpc.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- hutool 的依赖配置-->
|
<!-- hutool 的依赖配置-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
@@ -331,6 +347,12 @@
|
|||||||
<groupId>me.zhyd.oauth</groupId>
|
<groupId>me.zhyd.oauth</groupId>
|
||||||
<artifactId>JustAuth</artifactId>
|
<artifactId>JustAuth</artifactId>
|
||||||
<version>${justauth.version}</version>
|
<version>${justauth.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 离线IP地址定位库 ip2region -->
|
<!-- 离线IP地址定位库 ip2region -->
|
||||||
@@ -340,36 +362,18 @@
|
|||||||
<version>${ip2region.version}</version>
|
<version>${ip2region.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>${fastjson.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-system</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-job</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-demo</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-chat</artifactId>
|
<artifactId>ruoyi-chat</artifactId>
|
||||||
@@ -383,20 +387,6 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 微信模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-wechat</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 数字人模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-aihuman</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- AI流程编排模块 -->
|
<!-- AI流程编排模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
@@ -404,20 +394,6 @@
|
|||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- MCP模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-mcp</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 企业微信SDK -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.binarywang</groupId>
|
|
||||||
<artifactId>weixin-java-cp</artifactId>
|
|
||||||
<version>${weixin-java-cp.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Jackson XML -->
|
<!-- Jackson XML -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
@@ -528,20 +504,8 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<!-- 关闭过滤 -->
|
|
||||||
<filtering>false</filtering>
|
<filtering>false</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<!-- 引入所有 匹配文件进行过滤 -->
|
|
||||||
<includes>
|
|
||||||
<include>application*</include>
|
|
||||||
<include>bootstrap*</include>
|
|
||||||
<include>banner*</include>
|
|
||||||
</includes>
|
|
||||||
<!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,59 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# FFmpeg-enabled variant of ruoyi-admin/Dockerfile.
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.16-cds
|
FROM bellsoft/liberica-openjdk-rocky:17.0.16-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.8-cds
|
|
||||||
#FROM findepi/graalvm:java17-native
|
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
|
|
||||||
|
# Rocky base repositories do not provide the full codec build. RPM Fusion Free
|
||||||
|
# supplies ffmpeg with libx264, while the checks below prevent a reduced build
|
||||||
|
# from reaching production unnoticed.
|
||||||
|
RUN set -eux; \
|
||||||
|
dnf -y install dnf-plugins-core epel-release; \
|
||||||
|
. /etc/os-release; \
|
||||||
|
rocky_major="${VERSION_ID%%.*}"; \
|
||||||
|
if [ "${rocky_major}" -ge 9 ]; then \
|
||||||
|
dnf config-manager --set-enabled crb; \
|
||||||
|
else \
|
||||||
|
dnf config-manager --set-enabled powertools; \
|
||||||
|
fi; \
|
||||||
|
dnf -y install "https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-${rocky_major}.noarch.rpm"; \
|
||||||
|
dnf -y install ffmpeg; \
|
||||||
|
for filter in scale pad fps setsar format tpad trim settb setpts xfade \
|
||||||
|
aresample aformat apad atrim asetpts anullsrc concat acrossfade; do \
|
||||||
|
ffmpeg -hide_banner -filters 2>/dev/null | grep -Eq "[[:space:]]${filter}[[:space:]]"; \
|
||||||
|
done; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q dissolve; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q fadeblack; \
|
||||||
|
ffmpeg -hide_banner -h filter=xfade 2>&1 | grep -q slideleft; \
|
||||||
|
ffmpeg -hide_banner -encoders 2>/dev/null | grep -Eq '[[:space:]]libx264[[:space:]]'; \
|
||||||
|
ffmpeg -hide_banner -encoders 2>/dev/null | grep -Eq '[[:space:]]aac[[:space:]]'; \
|
||||||
|
ffprobe -hide_banner -version >/dev/null; \
|
||||||
|
dnf clean all; \
|
||||||
|
rm -rf /var/cache/dnf
|
||||||
|
|
||||||
RUN mkdir -p /ruoyi/server/logs \
|
RUN mkdir -p /ruoyi/server/logs \
|
||||||
/ruoyi/server/temp \
|
/ruoyi/server/temp \
|
||||||
/ruoyi/skywalking/agent
|
/ruoyi/skywalking/agent
|
||||||
|
|
||||||
WORKDIR /ruoyi/server
|
WORKDIR /ruoyi/server
|
||||||
|
|
||||||
ENV SERVER_PORT=8080 SNAIL_PORT=28080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
ENV SERVER_PORT=8080 \
|
||||||
|
SNAIL_PORT=28080 \
|
||||||
|
LANG=C.UTF-8 \
|
||||||
|
LC_ALL=C.UTF-8 \
|
||||||
|
JAVA_OPTS="" \
|
||||||
|
FFMPEG_PATH=/usr/bin/ffmpeg \
|
||||||
|
FFPROBE_PATH=/usr/bin/ffprobe
|
||||||
|
|
||||||
EXPOSE ${SERVER_PORT}
|
EXPOSE ${SERVER_PORT}
|
||||||
# 暴露 snail job 客户端端口 用于定时任务调度中心通信
|
|
||||||
EXPOSE ${SNAIL_PORT}
|
EXPOSE ${SNAIL_PORT}
|
||||||
|
|
||||||
ADD ./target/ruoyi-admin.jar ./app.jar
|
ADD ./target/ruoyi-admin.jar ./app.jar
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom \
|
||||||
|
-Djava.io.tmpdir=/ruoyi/server/temp \
|
||||||
|
-Dserver.port=${SERVER_PORT} \
|
||||||
-Dsnail-job.port=${SNAIL_PORT} \
|
-Dsnail-job.port=${SNAIL_PORT} \
|
||||||
# 应用名称 如果想区分集群节点监控 改成不同的名称即可
|
|
||||||
#-Dskywalking.agent.service_name=ruoyi-server \
|
|
||||||
#-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
|
|
||||||
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||||
-jar app.jar
|
-jar app.jar
|
||||||
|
|
||||||
|
|||||||
@@ -70,23 +70,12 @@
|
|||||||
<artifactId>ruoyi-system</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-job</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- demo模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-demo</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-chat</artifactId>
|
<artifactId>ruoyi-chat</artifactId>
|
||||||
@@ -98,29 +87,12 @@
|
|||||||
<artifactId>ruoyi-workflow</artifactId>
|
<artifactId>ruoyi-workflow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 微信模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-wechat</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 数字人模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-aihuman</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- AI流程编排模块 -->
|
<!-- AI流程编排模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-aiflow</artifactId>
|
<artifactId>ruoyi-aiflow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- MCP模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi-mcp</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.codecentric</groupId>
|
<groupId>de.codecentric</groupId>
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||||
|
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
|
import java.net.ServerSocket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
*
|
*
|
||||||
@@ -13,10 +16,66 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
|||||||
public class RuoYiAIApplication {
|
public class RuoYiAIApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
killPortProcess(6039);
|
||||||
SpringApplication application = new SpringApplication(RuoYiAIApplication.class);
|
SpringApplication application = new SpringApplication(RuoYiAIApplication.class);
|
||||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||||
application.run(args);
|
application.run(args);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ RuoYi-AI启动成功 ლ(´ڡ`ლ)゙");
|
System.out.println("(♥◠‿◠)ノ゙ RuoYi-AI启动成功 ლ(´ڡ`ლ)");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查并终止占用指定端口的进程
|
||||||
|
*
|
||||||
|
* @param port 端口号
|
||||||
|
*/
|
||||||
|
private static void killPortProcess(int port) {
|
||||||
|
try {
|
||||||
|
if (!isPortInUse(port)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
System.out.println("端口 " + port + " 已被占用,正在查找并终止进程...");
|
||||||
|
|
||||||
|
ProcessBuilder pb = new ProcessBuilder("netstat", "-ano");
|
||||||
|
Process process = pb.start();
|
||||||
|
java.io.BufferedReader reader = new java.io.BufferedReader(
|
||||||
|
new java.io.InputStreamReader(process.getInputStream()));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
if (line.contains(":" + port + " ") && line.contains("LISTENING")) {
|
||||||
|
String[] parts = line.trim().split("\\s+");
|
||||||
|
String pid = parts[parts.length - 1];
|
||||||
|
System.out.println("找到占用端口 " + port + " 的进程 PID: " + pid + ",正在终止...");
|
||||||
|
|
||||||
|
ProcessBuilder killPb = new ProcessBuilder("taskkill", "/F", "/PID", pid);
|
||||||
|
Process killProcess = killPb.start();
|
||||||
|
int exitCode = killProcess.waitFor();
|
||||||
|
if (exitCode == 0) {
|
||||||
|
System.out.println("进程 " + pid + " 已成功终止");
|
||||||
|
} else {
|
||||||
|
System.out.println("终止进程 " + pid + " 失败,exitCode: " + exitCode);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 等待一小段时间确保端口释放
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("检查/终止端口进程时发生异常: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查端口是否被占用
|
||||||
|
*/
|
||||||
|
private static boolean isPortInUse(int port) {
|
||||||
|
try (ServerSocket socket = new ServerSocket()) {
|
||||||
|
socket.bind(new InetSocketAddress(port));
|
||||||
|
return false;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package org.ruoyi.config;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
|
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||||
|
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BeanDefinitionRegistry后置处理器
|
||||||
|
* 解决 MapStruct Plus 生成的 mapper 冲突问题
|
||||||
|
*
|
||||||
|
* @author ruoyi team
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class MapperConflictResolver implements BeanDefinitionRegistryPostProcessor {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(MapperConflictResolver.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
|
||||||
|
String[] beanNames = registry.getBeanDefinitionNames();
|
||||||
|
|
||||||
|
// 查找冲突的 mapper bean
|
||||||
|
for (String beanName : beanNames) {
|
||||||
|
if (beanName.equals("chatMessageBoToChatMessageMapperImpl")) {
|
||||||
|
BeanDefinition beanDefinition = registry.getBeanDefinition(beanName);
|
||||||
|
String beanClassName = beanDefinition.getBeanClassName();
|
||||||
|
|
||||||
|
log.info("Found mapper bean: {} -> {}", beanName, beanClassName);
|
||||||
|
|
||||||
|
// 如果是 org.ruoyi.domain.bo.chat 包下的(冲突的),移除它
|
||||||
|
if (beanClassName != null && beanClassName.startsWith("org.ruoyi.domain.bo.chat")) {
|
||||||
|
log.warn("Removing conflicting bean definition: {} ({})", beanName, beanClassName);
|
||||||
|
registry.removeBeanDefinition(beanName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
|
||||||
|
// 不需要实现
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -80,10 +80,16 @@ public class AuthController {
|
|||||||
// 授权类型和客户端id
|
// 授权类型和客户端id
|
||||||
String clientId = loginBody.getClientId();
|
String clientId = loginBody.getClientId();
|
||||||
String grantType = loginBody.getGrantType();
|
String grantType = loginBody.getGrantType();
|
||||||
|
log.info("登录请求 - clientId: {}, grantType: {}", clientId, grantType);
|
||||||
SysClientVo client = clientService.queryByClientId(clientId);
|
SysClientVo client = clientService.queryByClientId(clientId);
|
||||||
|
log.info("查询客户端结果 - client: {}, grantType: {}", client, client != null ? client.getGrantType() : "null");
|
||||||
// 查询不到 client 或 client 内不包含 grantType
|
// 查询不到 client 或 client 内不包含 grantType
|
||||||
if (ObjectUtil.isNull(client) || !StringUtils.contains(client.getGrantType(), grantType)) {
|
if (ObjectUtil.isNull(client)) {
|
||||||
log.info("客户端id: {} 认证类型:{} 异常!.", clientId, grantType);
|
log.info("客户端id: {} 不存在!", clientId);
|
||||||
|
return R.fail(MessageUtils.message("auth.grant.type.error"));
|
||||||
|
}
|
||||||
|
if (!StringUtils.contains(client.getGrantType(), grantType)) {
|
||||||
|
log.info("客户端id: {} 认证类型:{} 不匹配! 数据库grantType: {}", clientId, grantType, client.getGrantType());
|
||||||
return R.fail(MessageUtils.message("auth.grant.type.error"));
|
return R.fail(MessageUtils.message("auth.grant.type.error"));
|
||||||
} else if (!SystemConstants.NORMAL.equals(client.getStatus())) {
|
} else if (!SystemConstants.NORMAL.equals(client.getStatus())) {
|
||||||
return R.fail(MessageUtils.message("auth.grant.type.blocked"));
|
return R.fail(MessageUtils.message("auth.grant.type.blocked"));
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ spring.boot.admin.client:
|
|||||||
metadata:
|
metadata:
|
||||||
username: ${spring.boot.admin.client.username}
|
username: ${spring.boot.admin.client.username}
|
||||||
userpassword: ${spring.boot.admin.client.password}
|
userpassword: ${spring.boot.admin.client.password}
|
||||||
username: @monitor.username@
|
username: ${MONITOR_USERNAME:ruoyi}
|
||||||
password: @monitor.password@
|
password: ${MONITOR_PASSWORD:123456}
|
||||||
|
|
||||||
--- # mcp配置信息
|
--- # mcp配置信息
|
||||||
mcp:
|
mcp:
|
||||||
@@ -27,12 +27,12 @@ snail-job:
|
|||||||
enabled: false
|
enabled: false
|
||||||
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
# 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务
|
||||||
group: "ruoyi_group"
|
group: "ruoyi_group"
|
||||||
# SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config` 表
|
# SnailJob 接入验证令牌 详见 docs/script/sql/ruoyi-ai-v3_mysql8.sql `sj_group_config` 表
|
||||||
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT"
|
||||||
server:
|
server:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 17888
|
port: 17888
|
||||||
# 命名空间UUID 详见 script/sql/ry_job.sql `sj_namespace`表`unique_id`字段
|
# 命名空间UUID 详见 docs/script/sql/ruoyi-ai-v3_mysql8.sql `sj_namespace`表`unique_id`字段
|
||||||
namespace: ${spring.profiles.active}
|
namespace: ${spring.profiles.active}
|
||||||
# 随主应用端口漂移
|
# 随主应用端口漂移
|
||||||
port: 2${server.port}
|
port: 2${server.port}
|
||||||
@@ -58,9 +58,16 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://127.0.0.1:3306/mysql?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://127.0.0.1:3306/ruoyi-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: root
|
||||||
|
# agent:
|
||||||
|
# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
|
# # url: jdbc:mysql://localhost:3306/agent_db
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
hikari:
|
hikari:
|
||||||
# 最大连接池数量
|
# 最大连接池数量
|
||||||
maxPoolSize: 20
|
maxPoolSize: 20
|
||||||
@@ -77,17 +84,13 @@ spring:
|
|||||||
# 多久检查一次连接的活性
|
# 多久检查一次连接的活性
|
||||||
keepaliveTime: 30000
|
keepaliveTime: 30000
|
||||||
|
|
||||||
agent:
|
|
||||||
mysql:
|
|
||||||
url: jdbc:mysql://localhost:3306/ruoyi-ai-agent?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
|
||||||
username: root
|
|
||||||
password: root
|
|
||||||
|
|
||||||
--- # 上传文件地址
|
--- # 上传文件地址
|
||||||
sys:
|
sys:
|
||||||
upload:
|
upload:
|
||||||
path: D:\\DownLoad
|
path: D:\\DownLoad
|
||||||
|
|
||||||
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||||
spring.data:
|
spring.data:
|
||||||
redis:
|
redis:
|
||||||
@@ -265,3 +268,4 @@ justauth:
|
|||||||
client-secret: 1f7d08**********5b7**********29e
|
client-secret: 1f7d08**********5b7**********29e
|
||||||
redirect-uri: ${justauth.address}/social-callback?source=gitea
|
redirect-uri: ${justauth.address}/social-callback?source=gitea
|
||||||
|
|
||||||
|
AGENT_ALLOWED_TABLES: ""
|
||||||
|
|||||||