Commit Graph

8 Commits

Author SHA1 Message Date
huangjianwu
ad57bc5489 fix(docker): 修复 Docker 部署打开显示 nginx 欢迎页
nginx/default.conf 被 docker-compose(多容器)与 Dockerfile.complete(单镜像)
共用,但两种模式对 location / 的需求相反:多容器需反代独立的 frontend 容器,
单镜像需直接服务本地静态文件。此前共用一份配置,导致其中一种部署总会回退到
nginx 默认欢迎页(本次为 compose 入口 nginx 用了 root 但容器内无前端产物)。

拆分为两份配置,各司其职、互不干扰:
- nginx/default.conf:compose 版,location / 反代 http://frontend:80
- nginx/standalone.conf(新增):单镜像版,location / 服务 /usr/share/nginx/html,
  /api、/static 代理到本地 127.0.0.1:8483
- Dockerfile.complete 改用 standalone.conf,移除不再需要的 sed 改写

已用 nginx -t 校验 standalone.conf 语法通过。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:17:52 +08:00
fivedang
39d051cc36 fix: nginx default page hijacks port 80 in Docker image
Two issues in Dockerfile.complete caused the nginx welcome page to appear
instead of the BiliNote UI:

1. /etc/nginx/sites-enabled/default had `listen 80 default_server` which
   took priority over the custom config in conf.d/
2. The nginx config proxied / to frontend:80, but the Dockerfile sed
   replaced it with 127.0.0.1:8080 where no service was running. The
   frontend is built as static files in /usr/share/nginx/html/.

Fix:
- Remove /etc/nginx/sites-enabled/default in Dockerfile
- Change location / to serve static files directly instead of proxying
- Remove the frontend proxy sed (no longer needed)
2026-06-15 00:19:54 +08:00
huangjianwu
c105342ded fix: 性能优化、前端转写器配置、任务进度丢失及 MLX Whisper 回退问题修复
### 性能优化
- 后端任务执行从串行锁改为 ThreadPoolExecutor 并发执行(默认3线程)
- 添加 GZipMiddleware 响应压缩 + Nginx gzip 配置
- 数据库连接池参数优化(pool_size=10, max_overflow=20)
- 视频帧提取并行化(ThreadPoolExecutor)
- LLM 重试配置缓存到实例,避免每次请求读 env var
- 前端路由级代码拆分(React.lazy + Suspense)
- Vite manualChunks 拆分 markdown/markmap/vendor
- MarkdownViewer 用 React.memo + useMemo 减少不必要渲染
- NoteHistory Fuse.js 实例 useMemo 缓存
- useTaskPolling 无待处理任务时跳过轮询
- 移除 antd 依赖(NoteForm Alert、modelForm Tag),改用 shadcn/ui

### 前端转写器配置(新功能)
- 新增 TranscriberConfigManager(JSON 文件存储,替代环境变量)
- 新增 GET/POST /transcriber_config API 端点
- 新增 GET /transcriber_models_status 模型下载状态查询
- 新增 POST /transcriber_download 后台模型下载触发
- 前端转写器设置页面:引擎选择、模型大小选择、模型下载管理
- deploy_status 端点同步从配置文件读取

### Bug 修复
- 修复任务进行中切换页面后进度丢失:Home.tsx status 派生逻辑补全中间状态
- 修复 MLX Whisper 静默回退 fast-whisper:移除环境变量门控,macOS 下自动尝试导入
- MLX Whisper 不可用时抛出 RuntimeError 而非静默回退
- 前端展示 MLX Whisper 可用性状态,不可用时禁用保存

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:09:34 +08:00
Paper-Dragon
1ce8b41bde Add GPU support with Docker enhancements
- Introduced a `Dockerfile.gpu` for GPU-enabled backend setup.
- Added `docker-compose.gpu.yml` to utilize GPU resources via NVIDIA.
- Fixed Nginx configuration for GPU backend port changes.
2025-07-04 00:16:39 +08:00
JefferyHcool
8b1bc54f2d refactor(backend): 重构后端异常处理和模型管理
- 新增自定义异常类 BizException、NoteError 和 ProviderError
- 优化了模型管理相关的逻辑,包括加载、删除和测试连接等功能
- 改进了 Douyin 下载器的错误处理
- 调整了任务重试逻辑和笔记生成的异常处理- 更新了相关组件和页面以适应新的异常处理机制
2025-06-06 21:30:23 +08:00
Jianwu Huang
32c57b61b5 Update default.conf
修复文件上传大小限制问题
2025-05-21 09:06:48 +08:00
黄建武
44d89e3b73 feat(nginx): 调整客户端请求体大小限制
- 设置 client_max_body_size 为 10G,允许上传大文件- 设置 client_body_buffer_size 为 128k,优化请求体缓冲
2025-05-15 11:34:39 +08:00
黄建武
be4c3313d4 feat(deploy): 重构部署方案并添加 nginx 代理
- 新增 nginx 服务作为前端和后端的代理
- 重新配置前端和后端服务,不再直接暴露端口
- 更新前端 Dockerfile,简化为静态文件服务器- 在 MarkdownViewer 组件中添加 ExternalLink 图标
2025-05-06 13:56:43 +08:00