feat: 新增 OCRmyPDF 轉換引擎 (v0.1.14)
## 新功能 - OCRmyPDF 轉換引擎:將掃描版 PDF 轉換為可搜尋 PDF - 支援 7 種語言:en, zh-TW, zh, ja, ko, de, fr - 與 PDFMathTranslate 風格一致的 UI 格式 (pdf-<lang>) - 自動偵測頁面方向並旋轉 - 自動校正傾斜 - 跳過已有文字層的頁面 - 詳細的 5 階段處理進度輸出 ## 建置 - Dockerfile:安裝 ocrmypdf 與 Tesseract OCR 語言包 ## 文件 - 更新 OCR 功能文件 - 文件目錄結構改為中文名稱 ## 測試 - 修復 BabelDOC 和 PDFMathTranslate 測試的 OCR mock - 所有 345 個測試通過
This commit is contained in:
parent
f24eec070c
commit
a06df23b1d
53 changed files with 1427 additions and 675 deletions
46
docs/範例/compose.production.yml
Normal file
46
docs/範例/compose.production.yml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# ConvertX-CN 生產環境配置
|
||||
# 適用於:正式部署
|
||||
|
||||
services:
|
||||
convertx:
|
||||
image: convertx/convertx-cn:latest
|
||||
container_name: convertx-cn
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000" # 只允許本機存取,透過反向代理對外
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
# 必填:登入驗證金鑰(至少 32 字元)
|
||||
- JWT_SECRET=${JWT_SECRET:?請設定 JWT_SECRET}
|
||||
|
||||
# 時區
|
||||
- TZ=Asia/Taipei
|
||||
|
||||
# 安全性設定
|
||||
- HTTP_ALLOWED=false # 禁止 HTTP(使用 HTTPS)
|
||||
- TRUST_PROXY=true # 信任反向代理
|
||||
- ACCOUNT_REGISTRATION=false # 關閉公開註冊
|
||||
|
||||
# 清理設定
|
||||
- AUTO_DELETE_EVERY_N_HOURS=24
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 4G
|
||||
reservations:
|
||||
memory: 2G
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/healthcheck"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Loading…
Add table
Add a link
Reference in a new issue