Files
MemRelay/projects/d1932ed6-07d3-4463-a224-8534ffd69a07/Checkpoint 2026-09-03 01-23-17 UTC [5be3ce8ce3].md
T

25 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Checkpoint 2026-09-03 01:23:17 UTC [5be3ce8ce3]
type: checkpoint
permalink: main/projects/d1932ed6-07d3-4463-a224-8534ffd69a07/checkpoint-2026-09-03-01-23-17-utc-5be3ce8ce3
stable_id: b3034d8a-1155-4165-a8c5-cec0d9e27e18
scope: project
project_id: d1932ed6-07d3-4463-a224-8534ffd69a07
memory_type: checkpoint
status: active
revision: 1
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
created_at: '2026-09-23T15:04:45.376868+00:00'
updated_at: '2026-09-23T15:04:45.376930+00:00'
tags:
- nextoffice
- reconfigure
- trusted_domains
- handoff
---
完成内容:修复 manage.py reconfigure 覆盖 trusted_domains 索引 0 通配项的问题。deploy.py 新增 configure_access_urls(host, nextcloud_port, onlyoffice_port),统一写 trusted_domains 0=#^.+$#、1=nextcloud、2=localhost、3=IP:端口,以及 overwrite.cli.url 和 onlyoffice DocumentServerUrl;deploy.configure 改为调用它(system_settings 元组去掉 index 字段,app_settings 去掉 DocumentServerUrl)。manage.py reconfigure 改为:prompt_value+validate_ipv4 校验新 IP;compose up -d --wait 等待重建的容器健康;调用 configure_access_urls,删除原来三条手写 occ。docs/TROUBLESHOOTING.md “页面打不开”节补充 reconfigure 会完整重写布局、旧实例再跑一次即可修复(docs/ 仍不入库)。
验证:py_compile 通过;临时脚本(已删除)用 mock occ/compose 断言 configure_access_urls 的 6 条 occ 调用序列;deploy.configure 全流程下 trusted_domains 恰 4 次、索引 0 通配、索引 3 IP:端口、DocumentServerUrl 仅 1 次、其余设置保留;manage.reconfigure 在临时 .env 上验证 compose 调用为 (up,-d,--wait)、委托参数为新 IP/端口、.env 重写正确、交互默认值保持旧值、0.0.0.0 被拒绝且不动 .env/容器;本机 docker compose v5.3.1 确认支持 --wait。已提交 e1154e5(fix: reconfigure 完整重写 trusted_domains 并复用安装时的访问地址设置),仅本地 commit 未 push,工作区干净。本会话共两次提交:7b3796e(端口冲突检查)、e1154e5(reconfigure 修复),均未 push。
下一步 / 给下个会话:未完成的候选方向仍是 manage.py restore(文档提到“恢复脚本”但不存在)、离线镜像包导出命令、HTTPS 一键切换、upgrade 与 backup --keep,需用户选择。小瑕疵未改:deploy.py 中 create_or_load_config 与 ensure_images 都打印 [1/6]。注意:manage.py 现在从 deploy 导入 choose_port/configure_access_urls/prompt_value/validate_ipv4,两个脚本必须同目录交付;本机 Docker Desktop 正运行 nextoffice 实例占用 8080/8081,不要对它跑 reconfigure 测试。