docs(deployment): phase 2 batch 1 — deployment side 4 docs (#167)#177
Merged
Conversation
Write the first four deployment-side documents from issue #167 phase 2 in source-grounded form. Every command, env var name, default value, secret list, healthcheck interval and CI flow detail is verified against docker-compose.yml, docker-compose.cliproxy.yml, .env.example, .github/workflows/deploy-personal.yml, .github/workflows/release.yml, cliproxy/config.yaml.template, cliproxy/docker-entrypoint.sh and src/lib/utils/config.ts as of the current tree. Documents: - guide/deployment/overview.md: two main paths (source + compose vs CI + remote SSH), the optional CLIProxyAPI sidecar overlay, and the service-name vs localhost pitfall. - guide/deployment/quickstart.md: end-to-end command chain from clone to admin login, including ENCRYPTION_KEY / ADMIN_TOKEN generation and the POSTGRES_PASSWORD vs DATABASE_URL consistency requirement. - guide/deployment/cliproxy-sidecar.md: how to retroactively attach the CLIProxyAPI sidecar after a deploy-personal.yml deployment, including pulling overlay files via raw.githubusercontent.com, appending CLIPROXY_* to .env, double -f startup, and rollback. - guide/deployment/env-reference.md: every .env.example field with code default vs docker-compose default, restart behavior, and the CLIProxyAPI three-place consistency note. Out of scope: usage / architecture batches, README slimming, and any UI helper-text changes. Cross-links use relative paths so they keep working under the VitePress base /AutoRouter/.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #177 +/- ##
==========================================
- Coverage 78.67% 74.13% -4.55%
==========================================
Files 145 145
Lines 11528 11043 -485
Branches 3995 3832 -163
==========================================
- Hits 9070 8187 -883
- Misses 1625 1657 +32
- Partials 833 1199 +366
🚀 New features to boost your workflow:
|
5 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 起跑:撰写 issue #167 第一批 10 篇中的部署侧 4 篇正文,严格以仓库源码为依据。
docs/guide/deployment/overview.mddocker-compose.cliproxy.yml,「容器服务名 vslocalhost」陷阱docs/guide/deployment/quickstart.mdENCRYPTION_KEY/ADMIN_TOKEN生成、POSTGRES_PASSWORD与DATABASE_URL一致性、healthcheck 行为docs/guide/deployment/cliproxy-sidecar.mddeploy-personal.yml完成后在服务器上手工补 sidecar 资料的完整步骤:curl拉叠加文件、追加.env、双-f up -d、登记实例、升级与回滚docs/guide/deployment/env-reference.md.env.example每个字段一一展开:代码默认 vs docker-compose 默认、必填情况、修改后重启行为、运行时配置覆盖关系;含录制功能两套默认差异的明确标注事实依据
逐条以仓库当前源码为根:
docker-compose.yml/docker-compose.cliproxy.yml:服务定义、网络、卷、healthcheck、${VAR:-default}默认值.env.example:字段清单与代码注释.github/workflows/deploy-personal.yml:workflow_dispatch输入、secrets 列表、自动生成.env的规则、smoke test 行为.github/workflows/release.yml:tag 规则、镜像构建与推送、git-cliffrelease notescliproxy/config.yaml.template/cliproxy/docker-entrypoint.sh:模板字段、入口脚本必填校验src/lib/utils/config.ts:代码默认值、必填校验、生产 fail-fast 行为src/lib/services/traffic-recording-service.ts与对应测试:录制相关字段的代码默认与运行时覆盖关系src/app/api/health/route.ts:健康端点响应 schema无法在源码中验证的具体值(例如
v0.1.0这种示例 release tag)均以「`<RELEASE_TAG>` 替换为实际部署的 release tag」形式标注,避免给出假数据。不在本 PR 范围
Test plan
pnpm format:check全绿(prettier 自动对齐了 markdown 表格列宽)pnpm docs:build3.15 s 构建成功Docsworkflow build job 通过