1.1 KiB
1.1 KiB
Changelog — 2026-06-07 Docker 镜像补 rsync 修复文件推送
摘要
生产 Docker 镜像未安装 rsync(及 SSH 依赖),导致 #/push 执行 POST /api/sync/files 时在 _rsync_push 抛出 FileNotFoundError: [Errno 2] No such file or directory,日志表现为 sync_files worker raised 与 2/2 servers missing results。
动机
用户反馈「推送失败」;容器日志确认 asyncio.create_subprocess_exec("rsync", ...) 找不到可执行文件,与源/目标路径配置无关。
变更
Dockerfile.prod:apt 安装rsync、openssh-client、sshpass(与sync_engine_v2._rsync_push一致)Dockerfile:同上,本地 Docker 开发与生产行为对齐
涉及文件
Dockerfile.prodDockerfile
迁移 / 重启
- 需重建镜像并重启 API 容器(
docker compose build+up -d) - 无数据库迁移
验证
docker exec nexus-prod-nexus-1 which rsync ssh sshpass
# 推送页选暂存目录 + 目标服务器 → POST /api/sync/files 应返回 task_id,sync_logs 无 FileNotFoundError