4.8 KiB
4.8 KiB
title, type, permalink, stable_id, scope, project_id, workspace_type, usage_profile_id, preference_context, document_type, revision, source_memory_ids, source_checkpoint_ids, source_file_ids, source_git_commit, source_git_commits, source_agent_sync_ids, model_connection, model_name, source_count, source_revisions, source_dispositions, cited_source_ids, job_cited_source_ids, conflicts, supersedes, preferences, source_cursor, source_hash, prompt_version, schema_version, curation_job_id, created_at, updated_at, tags
| title | type | permalink | stable_id | scope | project_id | workspace_type | usage_profile_id | preference_context | document_type | revision | source_memory_ids | source_checkpoint_ids | source_file_ids | source_git_commit | source_git_commits | source_agent_sync_ids | model_connection | model_name | source_count | source_revisions | source_dispositions | cited_source_ids | job_cited_source_ids | conflicts | supersedes | preferences | source_cursor | source_hash | prompt_version | schema_version | curation_job_id | created_at | updated_at | tags | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| System Architecture Overview | curated | main/projects/d1932ed6-07d3-4463-a224-8534ffd69a07/curated/development/system-architecture-overview | 4f9904fa-0a77-4ea6-9cfd-eb43aa949a54 | project | d1932ed6-07d3-4463-a224-8534ffd69a07 | development | null | development | architecture | 1 | 346195c0699cb8a1dbf5a9576daad945003e5d10 |
|
Sub2API | openai/gpt-oss-120b | 25 |
|
|
|
|
292 | deb30a6b83a03f25e5a91c6b2d68024ae3de216638efb5597267ac9555bb804f | 2026-08-12.3 | 3 | ef181130-6e65-470d-be87-1c06a2de345c | 2026-09-02T18:36:48.074255+00:00 | 2026-09-02T18:36:48.074835+00:00 |
|
系统架构概览 (Architecture)
主要组件
| 服务 | Docker 镜像 | 端口 | 说明 |
|---|---|---|---|
| PostgreSQL | postgres:17.11‑alpine |
5432 (内部) |
Nextcloud 数据库,使用 POSTGRES_ 环境变量配置。 |
| Redis | redis:7.4.11‑alpine |
6379 (内部) |
会话与缓存,使用 REDIS_PASSWORD 进行保护。 |
| ONLYOFFICE DocumentServer | onlyoffice/documentserver:9.4.0 |
8081 (外部) |
文档编辑服务,启用 JWT (ONLYOFFICE_JWT_SECRET)。 |
| Nextcloud (定制镜像) | nextoffice/nextcloud:34.0.3-oo10.1.2 |
8080 (外部) |
核心文件管理与协作平台,已在 deploy.py 中启用 text, viewer, onlyoffice 三个插件。 |
| Cron 容器 | 同上 (nextcloud 镜像) | — | 运行 Nextcloud 定时任务。 |
网络布局
- 两个 Docker 网络:
frontend(对外暴露端口)和backend(内部服务互通,internal: true)。 - 宿主机通过
host.docker.internal可以访问容器内部服务,符合 全局工作区概述 中的代理与网络约定。
部署流程概述 (deploy.py)
- 检查 Docker 与 Docker Compose 可用。
- 如存在
images/nextoffice-images-amd64.tar,使用docker load导入离线镜像;否则在线拉取基础镜像并在build/Dockerfile.nextcloud中构建定制镜像。 - 生成
.env(或读取已有),写入关键密码、JWT 秘钥等。 docker compose up -d启动全部服务。- 等待 ONLYOFFICE 与 Nextcloud 健康检查通过后,使用
occ启用插件、配置语言、默认域、共享策略等。 - 首次运行时清理默认示例文件并写入
nextoffice_defaults_cleaned标记,以防重复清理。
配置约定 (全局规则)
- KISS & YAGNI:仅使用必需的服务与环境变量,未引入假设的未来依赖。
- 复用已有框架:
docker-compose.yml直接使用官方镜像标签,无额外包装。 - 凭证边界:所有敏感信息均写入
.env并受文件系统权限保护 (600);实际密码仅存于 Vaultwarden,记忆文件aidocs/project_context.md仅记录名称与用途。 - AI / Git 集成默认关闭:本项目的部署脚本不调用任何模型或本地 Git 仓库,仅在用户明确请求时才执行相应功能。
参考来源: git:docker-compose.yml, git:deploy.py, git:README.md, global_guidance_document:6973450e-6ecc-48e3-8cdd-4d7d7707d843, global_guidance_document:d3a20d44-6001-4c88-8772-65dbfac75e6e