83 lines
2.3 KiB
Bash
83 lines
2.3 KiB
Bash
# Tool_OCR - Environment Configuration Template
|
|
# Copy this file to .env and fill in your actual values
|
|
|
|
# ===== Database Configuration =====
|
|
MYSQL_HOST=mysql.theaken.com
|
|
MYSQL_PORT=33306
|
|
MYSQL_USER=A060
|
|
MYSQL_PASSWORD=WLeSCi0yhtc7
|
|
MYSQL_DATABASE=db_A060
|
|
|
|
# ===== Application Configuration =====
|
|
# Server ports
|
|
BACKEND_PORT=12010
|
|
FRONTEND_PORT=12011
|
|
|
|
# Security
|
|
SECRET_KEY=your-secret-key-here-please-change-this-to-random-string
|
|
ALGORITHM=HS256
|
|
ACCESS_TOKEN_EXPIRE_MINUTES=1440
|
|
|
|
# ===== OCR Configuration =====
|
|
# PaddleOCR model directory
|
|
PADDLEOCR_MODEL_DIR=./models/paddleocr
|
|
# Supported languages (comma-separated)
|
|
OCR_LANGUAGES=ch,en,japan,korean
|
|
# Default confidence threshold
|
|
OCR_CONFIDENCE_THRESHOLD=0.5
|
|
# Maximum concurrent OCR workers
|
|
MAX_OCR_WORKERS=4
|
|
|
|
# ===== File Upload Configuration =====
|
|
# Maximum file size in bytes (50MB default)
|
|
MAX_UPLOAD_SIZE=52428800
|
|
# Allowed file extensions (comma-separated)
|
|
ALLOWED_EXTENSIONS=png,jpg,jpeg,pdf,bmp,tiff,doc,docx,ppt,pptx
|
|
# Upload directories
|
|
UPLOAD_DIR=./uploads
|
|
TEMP_DIR=./uploads/temp
|
|
PROCESSED_DIR=./uploads/processed
|
|
IMAGES_DIR=./uploads/images
|
|
|
|
# ===== Export Configuration =====
|
|
# Storage directories
|
|
STORAGE_DIR=./storage
|
|
MARKDOWN_DIR=./storage/markdown
|
|
JSON_DIR=./storage/json
|
|
EXPORTS_DIR=./storage/exports
|
|
|
|
# ===== PDF Generation Configuration =====
|
|
# Pandoc path (auto-detected if installed via brew)
|
|
PANDOC_PATH=/opt/homebrew/bin/pandoc
|
|
# WeasyPrint font directory
|
|
FONT_DIR=/System/Library/Fonts
|
|
# Default PDF page size
|
|
PDF_PAGE_SIZE=A4
|
|
# Default PDF margins (mm)
|
|
PDF_MARGIN_TOP=20
|
|
PDF_MARGIN_BOTTOM=20
|
|
PDF_MARGIN_LEFT=20
|
|
PDF_MARGIN_RIGHT=20
|
|
|
|
# ===== Translation Configuration (Reserved) =====
|
|
# Enable translation feature (reserved for future)
|
|
ENABLE_TRANSLATION=false
|
|
# Translation engine: offline (argostranslate) or api (future)
|
|
TRANSLATION_ENGINE=offline
|
|
# Argostranslate models directory
|
|
ARGOSTRANSLATE_MODELS_DIR=./models/argostranslate
|
|
|
|
# ===== Background Tasks Configuration =====
|
|
# Task queue type: memory (default) or redis (future)
|
|
TASK_QUEUE_TYPE=memory
|
|
# Redis URL (if using redis)
|
|
# REDIS_URL=redis://localhost:6379/0
|
|
|
|
# ===== CORS Configuration =====
|
|
# Allowed origins (comma-separated, * for all)
|
|
CORS_ORIGINS=http://localhost:12011,http://127.0.0.1:12011
|
|
|
|
# ===== Logging Configuration =====
|
|
LOG_LEVEL=INFO
|
|
LOG_FILE=./logs/app.log
|