docs: use one volume-naming rule across the Docker volume docs

未关闭 适合新手
#460 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
docker, docker-compose
领域
documentation

调研方向

阅读列出的三个文件:docs/DOCKER_CONFIGURATION.md、docs/VOLUMES.md 和 docs/VOLUME_TESTING.md,然后将其中的卷名称与 docker-compose.yml、docker-compose.prod.yml 和 docker-compose.test.yml 进行比较。只更新这些文档,确保将 Compose 键标识为键,Docker 命令使用带项目名前缀的卷名称,包含有关备份和恢复的警告,并修正过时的示例名称和日期。这只是文档修改,不需要进行测试。

由索引模型根据 Issue 内容生成。

描述

Follow-up to #444 (merged in #459). Part of #403. Docs only: branch from main and open the PR against main.

Problem

#444 documented that the real Docker volume names are <project>_<key> (for example taskflowapi_taskflow-data on the owner's machine). The other volume docs still use bare compose keys or hand-made names, so some commands in them do not match any real volume. The implementation notes on #444 listed three of these; checking them against main found more.

  1. docs/DOCKER_CONFIGURATION.md, "Volume Mounts" (about line 127). "Both environments use named Docker volumes" lists taskflow-data and taskflow-logs. The local prod harness (docker-compose.prod.yml) uses the keys taskflow-data-prod and taskflow-logs-prod, and every real name carries the project prefix. The new "Compose Project Name" section right after the table explains the prefix, so the table now sits above its own correction.
  2. docs/VOLUMES.md mixes three naming schemes.
    • Bare keys (taskflow-data, taskflow-logs) in docker volume inspect and docker volume rm (about lines 140, 250, 257).
    • Hand-made taskflow-prod-data and taskflow-prod-logs in the manual prod example (about lines 175-214).
    • taskflow-data-prod and taskflow-logs-prod for the compose harness (about line 231).
    • Data-safety point: the backup and restore commands (about lines 275-310) run docker run -v taskflow-data:/data .... Docker creates a named volume that does not exist, so on a machine where the real volume is <project>_taskflow-data this command silently mounts a new empty volume. A backup would contain nothing, and a restore would write into a stray volume.
  3. docs/VOLUME_TESTING.md. The sample docker volume inspect output has a CreatedAt of 2024-11-02T... (stale), and its commands hard-code the owner's project name taskflowapi_ (about lines 34-55, 349 and 368). #444 chose to name no machine-specific project in DOCKER_CONFIGURATION.md.

Change

Edit docs/DOCKER_CONFIGURATION.md, docs/VOLUMES.md and docs/VOLUME_TESTING.md only. One naming rule, applied everywhere:

  • When describing compose configuration, use the compose key (taskflow-data), and say it is a key.
  • In any docker volume ... or docker run -v ... command, use <project>_<key> with <project> as a placeholder, and point to the "Compose Project Name" section and docker volume ls --filter name=taskflow for finding the real name.
  • Name the prod harness keys correctly (taskflow-data-prod, taskflow-logs-prod). For the manual docker volume create example, either keep its own names with a sentence saying it is separate from the harness, or switch it to the harness names; pick one and say which.
  • Fix the stale CreatedAt sample, and replace the hard-coded taskflowapi_ in VOLUME_TESTING.md.
  • Put a one-line warning by the backup and restore commands: use the real, prefixed volume name, because a wrong name creates an empty volume.
  • Check each command against docker-compose.yml, docker-compose.prod.yml and docker-compose.test.yml (read-only; docker compose config --volumes is fine). Do not run any command that removes or creates a volume.

Acceptance criteria

  1. The "Volume Mounts" table in DOCKER_CONFIGURATION.md no longer presents bare keys as the Docker volume names, and names the prod harness keys correctly.
  2. VOLUMES.md uses one consistent naming rule; its inspect, remove, backup and restore commands use the project-prefixed name, with the backup and restore warning.
  3. VOLUME_TESTING.md has no stale 2024-11-02 sample and no hard-coded taskflowapi_.
  4. No compose file, .env or volume changes, and nothing suggests deleting a volume. The owner's decision on #444 stands: the taskflow_* volumes are kept.
  5. Only the three docs files change.

Tests

No tests apply (docs only). Say so in the PR body.

Out of scope

  • Adding name: to the compose files (a later option, documented in #459).
  • The live API port (8081 in the doc, 8080 in the gitignored local override) and the bare docker compose up/down -v in ci.yml, which is safe today because the runner has no .env.
  • The test-stack text already fixed in #459.
主要语言
C#
星标
1
派生
0
平均合并
2 小时 2 分钟
30 天内合并 PR
98

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nevridge/TaskFlow 的其他 Issue

查看 nevridge/TaskFlow 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。