优化: Docker 环境下的下载性能和网络稳定性

- Chromium 启动参数优化:禁用 dev-shm 和 GPU 加速,防止Docker内存不足
- 增加所有超时时间:login/navigate/export 超时 30s,下载超时 300s
- 改进网络延迟处理:增加数据加载等待时间,添加网络加载检测
- Docker Compose 资源配置:限制 2 CPU / 2GB 内存,DNS 配置国际公共 DNS
- Dockerfile 优化:添加 PYTHONHASHSEED 环境变量,跳过浏览器下载校验
- 新增 docker-debug.sh 脚本:便捷测试 Docker 容器中的下载功能
- 新增 .dockerignore:加速 Docker 构建,减少镜像大小

Docker 下载现在支持更长的网络延迟和更大的数据量
This commit is contained in:
2026-05-17 16:09:55 +08:00
parent 505e5ca895
commit 975f9e5887
6 changed files with 183 additions and 19 deletions
+25
View File
@@ -19,3 +19,28 @@ services:
- ./data:/app/data
- ./downloads:/app/downloads
restart: unless-stopped
# Docker 资源优化
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 1G
# 网络优化
networks:
- default
dns:
- 8.8.8.8
- 1.1.1.1
# 增加日志配置
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
default:
driver: bridge