facc04aa65
本提交为 .git 对象库损坏后的重建提交,内容等价于原先三个本地提交 (5e2fd4c2 / 57a53c98 / 5d7e1873)的累积结果,未做任何额外改动。 一、docs 结构整改(整改 #14) 根因:重构时新结构为 untracked 文件,执行 git stash(未带 -u)未纳入, 随后 git reset 拉回 HEAD 旧 tracked 树,导致旧树复活、新旧两棵目录 树并存于 docs/,共 791 文件、双分类体系冲突。 修复动作: - b2 同名异主题文件改名迁移保全 9 个 - C 类 39 个孤立文件按主题正确归类 - A/B1 类 222 个重复文件删除(新结构已有内容副本) - 9 个旧独有空目录删除 - 270 处内部引用按 verified 映射改写 - 整改记录 #14 登记于 04-运维文档/部署运维 结果:docs 791 → 569 文件,顶层仅规范 8 类 + 治理文件,单树恢复。 残留:约 20 处指向从未存在文件的陈旧死链,归入独立文档卫生任务。 二、compose 双目录对齐(消除踩坑 A) - docker-compose.yml:nginx 前端挂载全部由根目录 frontend-*/dist 改为 src/frontend-*/dist(h5 / agent / admin / terminal) - docker-compose.dev.yml:dev 服务 build context 与卷同步改 src/ - 效果:本地 docker compose up 不再把根目录 stale dist 挂回, 与线上一致,分叉隐患消除(已 docker compose config 校验通过) 防复发铁律: - 重构须提交;仓库修复须 git stash -u 或先 commit - 新结构须 git add 并提交,避免再次 untracked 复活 - H5 改动只动 src/frontend-h5/,禁改根目录遗留 frontend-*/
94 lines
2.6 KiB
Plaintext
94 lines
2.6 KiB
Plaintext
%% IT 智能服务台 — 架构组件图(卷挂载重构前后对比)
|
|
%% 文件: class-diagram.mermaid
|
|
|
|
classDiagram
|
|
class HostServer {
|
|
+String path: /opt/wecom-it-desk/
|
|
+String ip: 10.90.5.110
|
|
+String domain: itsupport.servyou.com.cn
|
|
}
|
|
|
|
class AppDirectory {
|
|
+String path: /opt/wecom-it-desk/app/
|
|
+String role: 唯一代码源
|
|
+List~File~ pythonFiles
|
|
+Boolean hasAuthPy
|
|
}
|
|
|
|
class BackendDirectory {
|
|
+String path: /opt/wecom-it-desk/backend/
|
|
+File dockerfile
|
|
+File requirementsTxt
|
|
+String note: 不再包含 app/ 子目录
|
|
}
|
|
|
|
class DockerImage {
|
|
+String name: wecom-it-desk-backend:latest
|
|
+String base: python:3.12-slim
|
|
+String pythonVersion: 3.12
|
|
+Boolean containsCode: false
|
|
+Boolean containsDeps: true
|
|
+String envPythondontWriteBytecode: "1"
|
|
}
|
|
|
|
class DockerContainer {
|
|
+String name: wecom_it_backend
|
|
+String workdir: /app
|
|
+String command: uvicorn app.main:app
|
|
+Integer port: 8000
|
|
+Boolean healthy
|
|
}
|
|
|
|
class VolumeMount {
|
|
+String hostPath: /opt/wecom-it-desk/app/
|
|
+String containerPath: /app/app/
|
|
+String type: bind
|
|
+String mode: rw
|
|
}
|
|
|
|
class UploadVolume {
|
|
+String name: backend-uploads
|
|
+String containerPath: /app/uploads/
|
|
+String type: named_volume
|
|
}
|
|
|
|
class LogMount {
|
|
+String hostPath: /var/log/wecom-it-desk/
|
|
+String containerPath: /app/logs/
|
|
+String type: bind
|
|
}
|
|
|
|
class DockerCompose {
|
|
+String file: docker-compose.yml
|
|
+String buildContext: ./backend
|
|
+List~Service~ services
|
|
}
|
|
|
|
class HealthCheck {
|
|
+String endpoint: /health
|
|
+Integer interval: 30
|
|
+Integer timeout: 10
|
|
+Integer retries: 3
|
|
+Integer startPeriod: 40
|
|
}
|
|
|
|
HostServer --> AppDirectory : contains
|
|
HostServer --> BackendDirectory : contains
|
|
HostServer --> DockerCompose : contains
|
|
|
|
DockerCompose --> DockerImage : builds
|
|
DockerCompose --> DockerContainer : runs
|
|
DockerCompose --> VolumeMount : configures
|
|
DockerCompose --> UploadVolume : configures
|
|
DockerCompose --> LogMount : configures
|
|
|
|
DockerImage --> DockerContainer : basis for
|
|
VolumeMount --> DockerContainer : mounts code to /app/app/
|
|
UploadVolume --> DockerContainer : mounts uploads to /app/uploads/
|
|
LogMount --> DockerContainer : mounts logs to /app/logs/
|
|
|
|
AppDirectory --> VolumeMount : source of
|
|
DockerContainer --> HealthCheck : monitored by
|
|
|
|
BackendDirectory --> DockerImage : provides Dockerfile + requirements.txt
|