> For the complete documentation index, see [llms.txt](https://summerain-1.gitbook.io/summerain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.14.md).

# V2.0.14

> 开发预发布版本。本版本从 `dev` 发布，可能快速跟进变更，不会被默认 `latest` 镜像选中。

## 概述

v2.0.14 完成 Docker 部署故事。生产主机现在只需要一个部署目录，放入 Compose 文件、`.env` 与可编辑的 `config/image-recipe.json`；配方以只读方式覆盖镜像内置配方，缺失时 Compose 会拒绝启动。本版本不改变应用代码。

## 变更

### Compose

* `backend/docker-compose.yml` 与 `backend/docker-compose.deploy.yml` 均以 `create_host_path: false` 将 `./config/image-recipe.json` 只读挂载到 `/app/config/image-recipe.json`，缺失文件时快速失败，而不是让 Docker 静默创建目录。
* 运维人员现在可以通过编辑部署副本并重启来调整变体、阈值或接受的格式，无需重建或更换镜像。
* 新增 `backend/config/image-recipe.json`，作为服务端策略文件的部署副本。

### 测试

* `backend/deploy_config_test.go` 现在断言两份 Compose 都包含配方覆盖挂载，并断言部署副本与内置默认保持逐字节一致。

### 文档

* README 与部署指南说明部署目录布局、只读配方覆盖、Compose 快速失败行为，以及命名卷的备份方式；升级与回滚命令改为在部署目录中执行；三语同步。

## 验证

* 后端 `go build ./...`、`go vet ./...`、`go test -count=1 ./...`：通过。
* 前端 `npm run lint`、`tsc -b` 与 Vitest：22 个测试文件、164 项测试通过。
* Docker 29.8.0 + Compose v5.5.1：部署目录与仓库内 `docker compose config` 均通过；缺失 `DOCKER_IMAGE` 被拒绝；容器内可见只读的配方覆盖；缺失配方路径会快速失败且不产生多余路径。
* Python requirements lock 校验与 GitBook 文档校验：三语各 37 页全部通过。

## 安装

开发镜像需显式拉取：

```bash
docker pull jaykserks/summerain:dev-v2.0.14
```

等效的精确开发标签：

```
jaykserks/summerain:dev-2.0.14
```

移动标签 `dev` 也指向最新的成功开发构建。本版本不会更新 `latest`、`main` 或稳定版语义化别名。

从 v2.0.13 升级无需数据库迁移或 API 迁移。就地升级的部署必须在下次启动前把 `config/image-recipe.json` 放到 Compose 文件旁（仓库检出为 `backend/config/image-recipe.json`），因为 Compose 现在缺少该文件就会拒绝启动。

## 已知限制

* 持久化图片仍保存在 `image_storage` 命名卷中，而不是主机目录；请按文档备份卷数据。
* 修改配方仍需重启并提升 `recipe_version`。
* 使用仓库检出的开发型部署同样需要在 Compose 文件旁保留 `config/image-recipe.json` 副本。

## 相关工作

本版本完成 v2 路线图的 Docker 部署阶段。剩余计划阶段为压测验证与审计。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.14.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
