2 Commits

Author SHA1 Message Date
ageerle
3c175ba28d chore: sync pending project changes 2026-08-04 15:23:19 +08:00
ageerle
e34592c3d4 release: prepare v3.1.0 2026-08-04 15:18:57 +08:00
11 changed files with 161 additions and 50 deletions

107
.github/workflows/publish-images.yml vendored Normal file
View 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

3
.gitignore vendored
View File

@@ -23,6 +23,9 @@ target/
.idea .idea
.claude .claude
.github .github
!.github/
!.github/workflows/
!.github/workflows/**
*.iws *.iws
*.iml *.iml
*.ipr *.ipr

View File

@@ -75,11 +75,11 @@ Use `docker-compose-all.yaml` to start all services at once (including backend,
git clone https://github.com/ageerle/ruoyi-ai.git git clone https://github.com/ageerle/ruoyi-ai.git
cd ruoyi-ai cd ruoyi-ai
# Start all services (pull pre-built images from registry) # Start all services (pull pre-built images from GHCR)
docker-compose -f docker-compose-all.yaml up -d docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
# Check service status # Check service status
docker-compose -f docker-compose-all.yaml ps docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
# Access services # Access services
# Admin Panel: http://localhost:25666 (admin / admin123) # Admin Panel: http://localhost:25666 (admin / admin123)
@@ -145,32 +145,32 @@ docker-compose up -d --build
### Image Registry ### Image Registry
All images are hosted on Alibaba Cloud Container Registry: Application images are published to GitHub Container Registry (GHCR) by GitHub Actions when a release tag such as `v3.1.0` is pushed:
``` ```
crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai 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
``` ```
Available images: The Compose file defaults to `latest`. To pin a release, create `docs/docker/ruoyi-ai/.env` with `RUIYI_VERSION=v3.1.0`.
- `mysql:v3` - MySQL database (includes initialization SQL)
- `redis:6.2` - Redis cache After the first workflow run, set the four GHCR packages to `Public` in GitHub so deployment servers can pull them without logging in.
- `weaviate:1.30.0` - Vector database
- `minio:latest` - Object storage 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.
- `ruoyi-ai-backend:latest` - Backend service
- `ruoyi-ai-admin:latest` - Admin frontend
- `ruoyi-ai-web:latest` - User frontend
### Common Commands ### Common Commands
```bash ```bash
# Stop all services # Stop all services
docker-compose -f docker-compose-all.yaml down docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml down
# View service logs # View service logs
docker-compose -f docker-compose-all.yaml logs -f [service-name] docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml logs -f [service-name]
# Restart a service # Restart a service
docker-compose -f docker-compose-all.yaml restart [service-name] docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml restart [service-name]
``` ```
## 📚 Documentation ## 📚 Documentation

View File

@@ -74,11 +74,11 @@
git clone https://github.com/ageerle/ruoyi-ai.git git clone https://github.com/ageerle/ruoyi-ai.git
cd ruoyi-ai cd ruoyi-ai
# 启动所有服务(从镜像仓库拉取预构建镜像) # 启动所有服务(从 GHCR 拉取预构建镜像)
docker-compose -f docker-compose-all.yaml up -d docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
# 查看服务状态 # 查看服务状态
docker-compose -f docker-compose-all.yaml ps docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
# 访问服务 # 访问服务
# 管理端: http://localhost:25666 (admin / admin123) # 管理端: http://localhost:25666 (admin / admin123)
@@ -144,32 +144,32 @@ docker-compose up -d --build
### 镜像仓库 ### 镜像仓库
所有镜像托管在阿里云容器镜像服务 每次推送类似 `v3.1.0` 的版本标签后GitHub Actions 会自动构建并发布应用镜像到 GitHub Container RegistryGHCR
``` ```
crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai 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`
- `mysql:v3` - MySQL 数据库(包含初始化 SQL
- `redis:6.2` - Redis 缓存 首次工作流运行完成后,请在 GitHub 的 Packages 设置中将这四个 GHCR 镜像设为 `Public`,用户服务器才能免登录拉取。
- `weaviate:1.30.0` - 向量数据库
- `minio:latest` - 对象存储 管理端 `ageerle/ruoyi-admin` 和用户端 `ageerle/ruoyi-web` 也必须存在同名版本标签;发布工作流会使用后端发布标签检出这两个仓库后再构建镜像。
- `ruoyi-ai-backend:latest` - 后端服务
- `ruoyi-ai-admin:latest` - 管理端前端
- `ruoyi-ai-web:latest` - 用户端前端
### 常用命令 ### 常用命令
```bash ```bash
# 停止所有服务 # 停止所有服务
docker-compose -f docker-compose-all.yaml down docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml down
# 查看服务日志 # 查看服务日志
docker-compose -f docker-compose-all.yaml logs -f [服务名] docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml logs -f [服务名]
# 重启某个服务 # 重启某个服务
docker-compose -f docker-compose-all.yaml restart [服务名] docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml restart [服务名]
``` ```
## 📚 使用文档 ## 📚 使用文档

View 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

View File

@@ -10,13 +10,13 @@
# - RuoYi-Admin (管理端前端) # - RuoYi-Admin (管理端前端)
# - RuoYi-Web (用户端前端) # - RuoYi-Web (用户端前端)
# #
# 镜像仓库地址: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai # 镜像仓库地址: ghcr.io/ageerle
services: services:
# ==================== MySQL 数据库 ==================== # ==================== MySQL 数据库 ====================
mysql: mysql:
# 阿里云镜像地址包含初始化SQL # GHCR 镜像包含初始化SQL
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/mysql:v3 image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-mysql:${RUIYI_VERSION:-latest}
container_name: ruoyi-ai-mysql container_name: ruoyi-ai-mysql
restart: always restart: always
ports: ports:
@@ -41,7 +41,7 @@ services:
# ==================== Redis 缓存 ==================== # ==================== Redis 缓存 ====================
redis: redis:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/redis:6.2 image: redis:6.2
container_name: ruoyi-ai-redis container_name: ruoyi-ai-redis
restart: always restart: always
ports: ports:
@@ -59,7 +59,7 @@ services:
# ==================== Weaviate 向量数据库 ==================== # ==================== Weaviate 向量数据库 ====================
weaviate: weaviate:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/weaviate:1.30.0 image: semitechnologies/weaviate:1.30.0
container_name: ruoyi-ai-weaviate container_name: ruoyi-ai-weaviate
restart: always restart: always
ports: ports:
@@ -78,7 +78,7 @@ services:
# ==================== MinIO 对象存储 ==================== # ==================== MinIO 对象存储 ====================
minio: minio:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/minio:latest image: minio/minio:latest
container_name: ruoyi-ai-minio container_name: ruoyi-ai-minio
restart: always restart: always
ports: ports:
@@ -95,7 +95,7 @@ services:
# ==================== RuoYi-AI 后端服务 ==================== # ==================== RuoYi-AI 后端服务 ====================
backend: backend:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/ruoyi-ai-backend:latest image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-backend:${RUIYI_VERSION:-latest}
container_name: ruoyi-ai-backend container_name: ruoyi-ai-backend
restart: always restart: always
ports: ports:
@@ -129,7 +129,7 @@ services:
# ==================== RuoYi-AI 管理端前端 ==================== # ==================== RuoYi-AI 管理端前端 ====================
admin-frontend: admin-frontend:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/ruoyi-ai-admin:latest image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-admin:${RUIYI_VERSION:-latest}
container_name: ruoyi-ai-admin container_name: ruoyi-ai-admin
restart: always restart: always
ports: ports:
@@ -154,7 +154,7 @@ services:
# ==================== RuoYi-AI 用户端前端 ==================== # ==================== RuoYi-AI 用户端前端 ====================
web-frontend: web-frontend:
image: crpi-31mraxd99y2gqdgr.cn-beijing.personal.cr.aliyuncs.com/ruoyi_ai/ruoyi-ai-web:latest image: ghcr.io/${IMAGE_OWNER:-ageerle}/ruoyi-ai-web:${RUIYI_VERSION:-latest}
container_name: ruoyi-ai-web container_name: ruoyi-ai-web
restart: always restart: always
ports: ports:

View File

@@ -43,7 +43,6 @@
<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已移除使用Jackson替代 -->
<!-- 面向运行时的D-ORM依赖 --> <!-- 面向运行时的D-ORM依赖 -->
<anyline.version>8.7.2-20250603</anyline.version> <anyline.version>8.7.2-20250603</anyline.version>
<!-- 工作流配置 --> <!-- 工作流配置 -->
@@ -62,6 +61,8 @@
<weaviate.version>1.19.6</weaviate.version> <weaviate.version>1.19.6</weaviate.version>
<dify.version>1.2.7</dify.version> <dify.version>1.2.7</dify.version>
<coze.version>0.4.2</coze.version> <coze.version>0.4.2</coze.version>
<!-- 智谱官方 Java SDK -->
<zai-sdk.version>0.3.5</zai-sdk.version>
<!-- gRPC 版本 - 解决 Milvus SDK 依赖冲突 --> <!-- gRPC 版本 - 解决 Milvus SDK 依赖冲突 -->
<grpc.version>1.62.2</grpc.version> <grpc.version>1.62.2</grpc.version>
@@ -342,8 +343,6 @@
</dependency> </dependency>
<!-- JustAuth 的依赖配置--> <!-- JustAuth 的依赖配置-->
<!-- 排除 fastjson(存在 RCE 漏洞且已停止维护), 项目内自定义的登录类(钉钉/企业微信/gitea/maxkey/topiam)已改用 Jackson -->
<!-- 注意: JustAuth 内置平台类(github/gitee/qq 等)内部仍使用 fastjson, 排除后如需使用这些平台请自行覆写对应请求类 -->
<dependency> <dependency>
<groupId>me.zhyd.oauth</groupId> <groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId> <artifactId>JustAuth</artifactId>

View File

@@ -37,7 +37,6 @@
<artifactId>ruoyi-common-sse</artifactId> <artifactId>ruoyi-common-sse</artifactId>
</dependency> </dependency>
<!-- FastJson已移除使用Spring Boot自带的Jackson -->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>

View File

@@ -61,7 +61,6 @@ public abstract class AbstractAuthWeChatEnterpriseRequest extends AuthDefaultReq
String userTicket = object.has("user_ticket") ? object.get("user_ticket").asText() : null; String userTicket = object.has("user_ticket") ? object.get("user_ticket").asText() : null;
JsonNode userDetail = getUserDetail(authToken.getAccessToken(), userId, userTicket); JsonNode userDetail = getUserDetail(authToken.getAccessToken(), userId, userTicket);
// rawUserInfo 为 JustAuth 的 fastjson 类型字段, 项目内无消费方, 不再设置
return AuthUser.builder() return AuthUser.builder()
.username(userDetail.has("name") ? userDetail.get("name").asText() : null) .username(userDetail.has("name") ? userDetail.get("name").asText() : null)
.nickname(userDetail.has("alias") ? userDetail.get("alias").asText() : null) .nickname(userDetail.has("alias") ? userDetail.get("alias").asText() : null)

View File

@@ -91,7 +91,6 @@ public class AuthDingTalkV2Request extends AuthDefaultRequest {
authToken.setOpenId(object.has("openId") ? object.get("openId").asText() : null); authToken.setOpenId(object.has("openId") ? object.get("openId").asText() : null);
authToken.setUnionId(object.has("unionId") ? object.get("unionId").asText() : null); authToken.setUnionId(object.has("unionId") ? object.get("unionId").asText() : null);
// rawUserInfo 为 JustAuth 的 fastjson 类型字段, 项目内无消费方, 不再设置
return AuthUser.builder() return AuthUser.builder()
.uuid(object.has("unionId") ? object.get("unionId").asText() : null) .uuid(object.has("unionId") ? object.get("unionId").asText() : null)
.username(object.has("nick") ? object.get("nick").asText() : null) .username(object.has("nick") ? object.get("nick").asText() : null)

View File

@@ -28,7 +28,7 @@
<dependency> <dependency>
<groupId>ai.z.openapi</groupId> <groupId>ai.z.openapi</groupId>
<artifactId>zai-sdk</artifactId> <artifactId>zai-sdk</artifactId>
<version>0.3.5</version> <version>${zai-sdk.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@@ -126,6 +126,7 @@
<version>${langchain4j.version}</version> <version>${langchain4j.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
@@ -145,8 +146,6 @@
<version>${langgraph4j.version}</version> <version>${langgraph4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId> <artifactId>commons-collections4</artifactId>