mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-09-13 00:14:59 +00:00
docs: add prebuilt image deployment guide
This commit is contained in:
38
README.md
38
README.md
@@ -71,22 +71,42 @@ This project provides two Docker deployment methods:
|
||||
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
|
||||
# Requirements: Docker Engine and Docker Compose V2
|
||||
|
||||
# Clone the v3.1.0 release
|
||||
git clone --depth 1 --branch v3.1.0 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
|
||||
# Pin the image version. Public GHCR images do not require docker login.
|
||||
cp docs/docker/ruoyi-ai/.env.example docs/docker/ruoyi-ai/.env
|
||||
sed -i 's/^RUIYI_VERSION=.*/RUIYI_VERSION=v3.1.0/' docs/docker/ruoyi-ai/.env
|
||||
|
||||
# Pull pre-built images from GHCR and start all services
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml pull
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
|
||||
|
||||
# Check service status
|
||||
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||
|
||||
# Access services
|
||||
# Admin Panel: http://localhost:25666 (admin / admin123)
|
||||
# User Frontend: http://localhost:25137
|
||||
# Backend API: http://localhost:26039
|
||||
# Access services (replace SERVER_IP with the server address)
|
||||
# Admin Panel: http://SERVER_IP:25666 (admin / admin123)
|
||||
# User Frontend: http://SERVER_IP:25137
|
||||
# Backend API: http://SERVER_IP:26039
|
||||
```
|
||||
|
||||
The default Compose file also publishes MySQL (`23306`), Redis (`26379`),
|
||||
Weaviate (`28080`), and MinIO (`29000`/`29090`). For production deployments,
|
||||
change the default MySQL and MinIO passwords and expose only the application
|
||||
ports through the firewall or a reverse proxy.
|
||||
|
||||
To upgrade to another published release, update `RUIYI_VERSION` in
|
||||
`docs/docker/ruoyi-ai/.env`, then run `docker compose pull` and
|
||||
`docker compose up -d` with the same `--env-file` and `-f` options. Do not use
|
||||
`docker compose down -v` unless you intend to delete persistent data volumes.
|
||||
|
||||
### Method 2: Step-by-step Deployment (Source Build)
|
||||
|
||||
If you need to build backend services from source, follow these steps:
|
||||
|
||||
35
README_ZH.md
35
README_ZH.md
@@ -70,22 +70,39 @@
|
||||
使用 `docker-compose-all.yaml` 可以一键启动所有服务(包括后端、管理端、用户端及依赖服务):
|
||||
|
||||
```bash
|
||||
# 克隆仓库
|
||||
git clone https://github.com/ageerle/ruoyi-ai.git
|
||||
# 环境要求:Docker Engine 和 Docker Compose V2
|
||||
|
||||
# 克隆 v3.1.0 版本
|
||||
git clone --depth 1 --branch v3.1.0 https://github.com/ageerle/ruoyi-ai.git
|
||||
cd ruoyi-ai
|
||||
|
||||
# 启动所有服务(从 GHCR 拉取预构建镜像)
|
||||
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
|
||||
# 固定镜像版本。GHCR 镜像已公开,无需 docker login
|
||||
cp docs/docker/ruoyi-ai/.env.example docs/docker/ruoyi-ai/.env
|
||||
sed -i 's/^RUIYI_VERSION=.*/RUIYI_VERSION=v3.1.0/' docs/docker/ruoyi-ai/.env
|
||||
|
||||
# 从 GHCR 拉取预构建镜像并启动全部服务
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml pull
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml up -d
|
||||
|
||||
# 查看服务状态
|
||||
docker compose -f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||
docker compose --env-file docs/docker/ruoyi-ai/.env \
|
||||
-f docs/docker/ruoyi-ai/docker-compose-all.yaml ps
|
||||
|
||||
# 访问服务
|
||||
# 管理端: http://localhost:25666 (admin / admin123)
|
||||
# 用户端: http://localhost:25137
|
||||
# 后端API: http://localhost:26039
|
||||
# 访问服务(将 SERVER_IP 替换为服务器地址)
|
||||
# 管理端: http://SERVER_IP:25666 (admin / admin123)
|
||||
# 用户端: http://SERVER_IP:25137
|
||||
# 后端API: http://SERVER_IP:26039
|
||||
```
|
||||
|
||||
默认 Compose 还会发布 MySQL(`23306`)、Redis(`26379`)、Weaviate(`28080`)和
|
||||
MinIO(`29000`/`29090`)端口。生产环境请修改 MySQL 和 MinIO 默认密码,并通过防火墙或反向代理只开放应用端口。
|
||||
|
||||
升级到其他已发布版本时,修改 `docs/docker/ruoyi-ai/.env` 中的 `RUIYI_VERSION`,然后使用相同的
|
||||
`--env-file` 和 `-f` 参数执行 `docker compose pull`、`docker compose up -d`。除非确定要删除持久化数据卷,
|
||||
不要执行 `docker compose down -v`。
|
||||
|
||||
### 方式二:分步部署(源码编译)
|
||||
|
||||
如果您需要从源码构建后端服务,请按照以下步骤操作:
|
||||
|
||||
Reference in New Issue
Block a user