feat: migrate to WSL Ubuntu native development environment

從 Docker/macOS+Conda 部署遷移到 WSL2 Ubuntu 原生開發環境

主要變更:
- 移除所有 Docker 相關配置檔案 (Dockerfile, docker-compose.yml, .dockerignore 等)
- 移除 macOS/Conda 設置腳本 (SETUP.md, setup_conda.sh)
- 新增 WSL Ubuntu 自動化環境設置腳本 (setup_dev_env.sh)
- 新增後端/前端快速啟動腳本 (start_backend.sh, start_frontend.sh)
- 統一開發端口配置 (backend: 8000, frontend: 5173)
- 改進資料庫連接穩定性(連接池、超時設置、重試機制)
- 更新專案文檔以反映當前 WSL 開發環境

Technical improvements:
- Database connection pooling with health checks and auto-reconnection
- Retry logic for long-running OCR tasks to prevent DB timeouts
- Extended JWT token expiration to 24 hours
- Support for Office documents (pptx, docx) via LibreOffice headless
- Comprehensive system dependency installation in single script

Environment:
- OS: WSL2 Ubuntu 24.04
- Python: 3.12 (venv)
- Node.js: 24.x LTS (nvm)
- Backend Port: 8000
- Frontend Port: 5173

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
egg
2025-11-13 21:00:42 +08:00
parent 0f81d5e70b
commit d7e64737b7
25 changed files with 511 additions and 1774 deletions

View File

@@ -14,10 +14,11 @@ Tool_OCR is a web-based application for batch image-to-text conversion with mult
## Tech Stack
### Development Environment
- **OS Platform**: Windows 10/11
- **Python Version**: 3.10 (via Conda)
- **Environment Manager**: Conda
- **Virtual Environment Path**: `C:\Users\lin46\.conda\envs\tool_ocr`
- **OS Platform**: WSL2 Ubuntu 24.04
- **Python Version**: 3.12
- **Environment Manager**: Python venv
- **Virtual Environment Path**: `./venv`
- **Node.js**: 24.x LTS (via nvm)
- **IDE Recommended**: VS Code with Python + React extensions
### Backend Technologies
@@ -74,11 +75,15 @@ Tool_OCR is a web-based application for batch image-to-text conversion with mult
### Environment Setup (Backend)
```bash
# Create new conda environment
conda create -n tool_ocr python=3.10 -y
# Run automated setup script (recommended)
./setup_dev_env.sh
# Or manually:
# Create Python virtual environment
python3 -m venv venv
# Activate environment
conda activate tool_ocr
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt