From 15ffb4ec2e44e0b93f1ba57b809f58a7594f3cdc Mon Sep 17 00:00:00 2001 From: Ansn <1542690643@qq.com> Date: Fri, 21 Aug 2026 11:54:57 +0800 Subject: [PATCH] docs: improve Windows Docker deployment instructions --- README.md | 36 +++++++++++++++++++++++++++++++++++- README_ZH.md | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f5cab7f..a1cff71b 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,12 @@ This project provides two Docker deployment methods: ### 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): +#### Requirements +- Docker Engine(Linux/macOS)或 Docker Desktop(Windows) +- Docker Compose V2 +#### Linux / macOS ```bash -# 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 @@ -103,6 +106,37 @@ docker compose --env-file docs/docker/ruoyi-ai/.env \ # Backend API: http://SERVER_IP:26039 ``` +#### Windows PowerShell +If you are using Windows with Docker Desktop, you can use PowerShell to execute the following commands: + +```PowerShell + +# Clone the v3.1.0 release +git clone --depth 1 --branch v3.1.0 https://github.com/ageerle/ruoyi-ai.git +cd ruoyi-ai + +# Create the environment configuration file +Copy-Item docs\docker\ruoyi-ai\.env.example docs\docker\ruoyi-ai\.env + +# Pin the image version +(Get-Content docs\docker\ruoyi-ai\.env) ` + -replace '^RUIYI_VERSION=.*', 'RUIYI_VERSION=v3.1.0' | + Set-Content docs\docker\ruoyi-ai\.env + +# Check the environment configuration +Get-Content 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 --env-file docs\docker\ruoyi-ai\.env ` + -f docs\docker\ruoyi-ai\docker-compose-all.yaml ps +``` + 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 diff --git a/README_ZH.md b/README_ZH.md index 9c60696f..4c80d303 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -76,10 +76,13 @@ ### 方式一:一键启动所有服务(推荐) 使用 `docker-compose-all.yaml` 可以一键启动所有服务(包括后端、管理端、用户端及依赖服务): +#### 环境要求 +- Docker Engine(Linux/macOS)或 Docker Desktop(Windows) +- Docker Compose V2 + +#### Linux / macOS ```bash -# 环境要求: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 @@ -104,6 +107,35 @@ docker compose --env-file docs/docker/ruoyi-ai/.env \ # 后端API: http://SERVER_IP:26039 ``` +#### Windows PowerShell +如果您使用 Windows + Docker Desktop,可以使用 PowerShell 执行以下命令: +```PowerShell +# 克隆 v3.1.0 版本 +git clone --depth 1 --branch v3.1.0 https://github.com/ageerle/ruoyi-ai.git +cd ruoyi-ai + +# 创建环境配置文件 +Copy-Item docs\docker\ruoyi-ai\.env.example docs\docker\ruoyi-ai\.env + +# 固定镜像版本 +(Get-Content docs\docker\ruoyi-ai\.env) ` + -replace '^RUIYI_VERSION=.*', 'RUIYI_VERSION=v3.1.0' | + Set-Content docs\docker\ruoyi-ai\.env + +# 查看环境配置 +Get-Content 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 --env-file docs\docker\ruoyi-ai\.env ` + -f docs\docker\ruoyi-ai\docker-compose-all.yaml ps +``` + 默认 Compose 还会发布 MySQL(`23306`)、Redis(`26379`)、Weaviate(`28080`)和 MinIO(`29000`/`29090`)端口。生产环境请修改 MySQL 和 MinIO 默认密码,并通过防火墙或反向代理只开放应用端口。