Files
MemRelay/projects/d1932ed6-07d3-4463-a224-8534ffd69a07/Checkpoint 2026-09-03 01-44-15 UTC [0c41dcf8ba].md
T

26 lines
3.0 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:44:15 UTC [0c41dcf8ba]
type: checkpoint
permalink: main/projects/d1932ed6-07d3-4463-a224-8534ffd69a07/checkpoint-2026-09-03-01-44-15-utc-0c41dcf8ba
stable_id: 98857cff-874e-476a-97c3-9c9c0c09b077
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:49.995628+00:00'
updated_at: '2026-09-23T15:04:49.995692+00:00'
tags:
- nextoffice
- python36
- server
- onlyoffice
- handoff
---
完成内容:(1) deploy.py / manage.py 兼容 Python 3.6(提交 27fc41b,已 push):去掉 future annotations,注解改 typing 形式,CompletedProcess 去下标,text= 改 universal_newlines=,write_text(newline=) 改 open(),add_subparsers 去 required 并在 main() 中处理无子命令;manage.reconfigure 改用 deploy.write_env;README 标注 Python 3.6 及以上。本地 ast feature_version=(3,6) 语法校验 + mock 行为测试通过;服务器 /root/NextOffice git pull 到 27fc41b 后用真实 Python 3.6.8 验证:py_compile OK、deploy.py --help OK、manage.py 无参数打印帮助退出 2、无 .env 时 status 优雅报错、全部 mock 测试 PASS(含真实 docker ps 解析);临时文件和 __pycache__ 已清,服务器工作区干净。(2) 按用户要求彻底删除 /opt/onlyoffice 的 onlyoffice-ds(compose down -v、rmi documentserver:latest 两个 tag、rm -rf 目录),8080 已空闲;验证 open-webui / grid-bulletin(shichangbu) 未受影响,剩余卷仅 open-webui。磁盘 23G 已用。SSH 已断开。
待用户确认的方案(本次仅回答未实施):用户问 ONLYOFFICE 能否不绑定 IP。结论:Nextcloud 已通过 trusted_domains 通配不限 IP;ONLYOFFICE 的 DocumentServerUrl 是浏览器加载编辑器的绝对地址,换 IP 后需 `manage.py reconfigure --host-ip` 一次性修改。彻底方案:改为同源相对路径 `DocumentServerUrl=/ds-vpath/`,在自建 Nextcloud 镜像的 Apache 里启用 proxy/proxy_http/proxy_wstunnel,ProxyPass /ds-vpath/ -> http://onlyoffice/ 并设 X-Forwarded-Host "%{HTTP_HOST}/ds-vpath"(ONLYOFFICE 官方 docker-onlyoffice-nextcloud 参考部署就是这么做的,参考 https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud/blob/master/nginx.conf 和 helpcenter docs-nextcloud-proxy)。收益:编辑器完全不依赖 HOST_IP,客户端只需一个端口,HTTPS 只需一张证书。代价:重建镜像(tag 需变,离线 tar 需重新导出)、deploy.py/compose/docs 调整,需在本机实例端到端验证。替代:用内网 DNS 名代替 IP(需让 HOST_IP 接受主机名)。
下一步 / 给下个会话:等用户决定是否实施 ds-vpath 同源方案;用户将自行在服务器部署(现在 `python3 deploy.py` 在 3.6.8 上可用,8080/8081 已空闲),不要代他跑。服务器上还有无容器使用的 nextcloud:latest 镜像 1.52GB 未删(已告知)。候选开发方向不变:manage.py restore、镜像包导出、HTTPS 切换、upgrade/backup --keep。