docs: 添加 Docker 版本更新说明(中英文)

- 在部署文档中添加详细的 Docker 版本更新步骤(中文和英文)
- 在 README 中添加简要的更新说明和文档链接(中文和英文)
- 包含更新到最新版本和特定版本的方法
- 添加注意事项(备份数据库、服务中断等)
This commit is contained in:
WrBug
2025-12-26 02:30:06 +08:00
parent 62669719d9
commit b6d66aa81e
4 changed files with 102 additions and 0 deletions
+19
View File
@@ -228,6 +228,25 @@ docker-compose up -d
# image: wrbug/polyhermes:v1.0.0
```
**更新 Docker 版本**
```bash
# 1. 停止当前容器
docker-compose -f docker-compose.prod.yml down
# 2. 拉取最新镜像
docker pull wrbug/polyhermes:latest
# 3. 重新启动服务
docker-compose -f docker-compose.prod.yml up -d
# 或更新到特定版本(例如 v1.0.1)
# 修改 docker-compose.prod.yml 中的镜像标签为: image: wrbug/polyhermes:v1.0.1
# 然后执行: docker-compose -f docker-compose.prod.yml up -d
```
详细更新说明请参考:[部署文档 - 更新 Docker 版本](docs/zh/DEPLOYMENT.md#更新-docker-版本)
2. **本地构建部署(开发环境)**
```bash
+19
View File
@@ -228,6 +228,25 @@ docker-compose up -d
# image: wrbug/polyhermes:v1.0.0
```
**Update Docker Version**:
```bash
# 1. Stop current containers
docker-compose -f docker-compose.prod.yml down
# 2. Pull latest image
docker pull wrbug/polyhermes:latest
# 3. Restart services
docker-compose -f docker-compose.prod.yml up -d
# Or update to specific version (e.g., v1.0.1)
# Modify image tag in docker-compose.prod.yml to: image: wrbug/polyhermes:v1.0.1
# Then run: docker-compose -f docker-compose.prod.yml up -d
```
For detailed update instructions, please refer to: [Deployment Guide - Update Docker Version](docs/en/DEPLOYMENT.md#update-docker-version)
2. **Local Build Deployment (Development Environment)**
```bash
+32
View File
@@ -104,6 +104,38 @@ export IMAGE_TAG=v1.0.0
# In docker-compose.prod.yml use: image: wrbug/polyhermes:${IMAGE_TAG:-latest}
```
**Update Docker Version**:
When a new version is released, you can update using the following steps:
```bash
# 1. Stop currently running containers
docker-compose -f docker-compose.prod.yml down
# 2. Pull the latest version image (or specific version)
# Update to latest version
docker pull wrbug/polyhermes:latest
# Or update to specific version (e.g., v1.0.1)
docker pull wrbug/polyhermes:v1.0.1
# 3. If using a specific version, modify the image tag in docker-compose.prod.yml
# Edit docker-compose.prod.yml, change image to:
# image: wrbug/polyhermes:v1.0.1
# 4. Restart services
docker-compose -f docker-compose.prod.yml up -d
# 5. Check logs to confirm services started normally
docker-compose -f docker-compose.prod.yml logs -f
```
**Notes**:
- ⚠️ It is recommended to backup the database before updating (if using MySQL in Docker Compose)
- ⚠️ Service will be briefly interrupted during update, recommend updating during off-peak hours
- ✅ Using `docker-compose pull` can automatically pull the latest image and update (if using `latest` tag)
- ✅ View available versions: Visit [Docker Hub](https://hub.docker.com/r/wrbug/polyhermes/tags) or [GitHub Releases](https://github.com/WrBug/PolyHermes/releases)
2. **Local Build Deployment (Development Environment)**
Suitable for development environments or scenarios requiring custom builds.
+32
View File
@@ -102,6 +102,38 @@ export IMAGE_TAG=v1.0.0
# 在 docker-compose.prod.yml 中使用: image: wrbug/polyhermes:${IMAGE_TAG:-latest}
```
**更新 Docker 版本**
当有新版本发布时,可以通过以下步骤更新:
```bash
# 1. 停止当前运行的容器
docker-compose -f docker-compose.prod.yml down
# 2. 拉取最新版本的镜像(或指定版本)
# 更新到最新版本
docker pull wrbug/polyhermes:latest
# 或更新到特定版本(例如 v1.0.1)
docker pull wrbug/polyhermes:v1.0.1
# 3. 如果使用特定版本,需要修改 docker-compose.prod.yml 中的镜像标签
# 编辑 docker-compose.prod.yml,将 image 改为:
# image: wrbug/polyhermes:v1.0.1
# 4. 重新启动服务
docker-compose -f docker-compose.prod.yml up -d
# 5. 查看日志确认服务正常启动
docker-compose -f docker-compose.prod.yml logs -f
```
**注意事项**
- ⚠️ 更新前建议备份数据库(如果使用 Docker Compose 中的 MySQL
- ⚠️ 更新过程中服务会短暂中断,建议在低峰期进行
- ✅ 使用 `docker-compose pull` 可以自动拉取最新镜像并更新(如果使用 `latest` 标签)
- ✅ 查看可用版本:访问 [Docker Hub](https://hub.docker.com/r/wrbug/polyhermes/tags) 或 [GitHub Releases](https://github.com/WrBug/PolyHermes/releases)
2. **本地构建部署(开发环境)**
适用于开发环境或需要自定义构建的场景。