chore: remove AI dev files from repo and clean up env config
- Remove .claude/, openspec/, AGENTS.md, CLAUDE.md from git tracking - Simplify .env.example: remove unused path configs (use config.py defaults) - Clean up .env for production: remove hardcoded secrets, use env var substitution - Path configs now use sensible defaults from backend/app/core/config.py: - uploads -> backend/uploads/ - storage -> backend/storage/ - results -> backend/storage/results/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
85
.env
85
.env
@@ -1,82 +1,49 @@
|
||||
# Tool_OCR - Docker Environment Configuration
|
||||
# Copy this file to .env when deploying with Docker
|
||||
# Tool_OCR - Production/Docker Environment Configuration
|
||||
# For local development, copy .env.example to .env.local and configure there
|
||||
#
|
||||
# This file is for Docker deployment or production use.
|
||||
# Sensitive values should be set via environment variables or secrets management.
|
||||
|
||||
# ===== Database Configuration =====
|
||||
MYSQL_HOST=mysql.theaken.com
|
||||
MYSQL_PORT=33306
|
||||
MYSQL_USER=A060
|
||||
MYSQL_PASSWORD=WLeSCi0yhtc7
|
||||
MYSQL_DATABASE=db_A060
|
||||
# Set these via Docker secrets or environment variables in production
|
||||
MYSQL_HOST=${MYSQL_HOST:-localhost}
|
||||
MYSQL_PORT=${MYSQL_PORT:-3306}
|
||||
MYSQL_USER=${MYSQL_USER:-}
|
||||
MYSQL_PASSWORD=${MYSQL_PASSWORD:-}
|
||||
MYSQL_DATABASE=${MYSQL_DATABASE:-}
|
||||
|
||||
# ===== Application Configuration =====
|
||||
# External port (exposed to host)
|
||||
# Production port (different from development)
|
||||
FRONTEND_PORT=12010
|
||||
BACKEND_PORT=8000
|
||||
|
||||
# Security (IMPORTANT: Change SECRET_KEY in production!)
|
||||
SECRET_KEY=your-secret-key-here-please-change-this-to-random-string
|
||||
# Security - MUST be set via environment variable in production
|
||||
SECRET_KEY=${SECRET_KEY:-change-this-in-production}
|
||||
ALGORITHM=HS256
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES=1440
|
||||
|
||||
# ===== External Authentication Configuration =====
|
||||
EXTERNAL_AUTH_API_URL=${EXTERNAL_AUTH_API_URL:-https://your-auth-api.example.com}
|
||||
EXTERNAL_AUTH_ENDPOINT=/api/auth/login
|
||||
EXTERNAL_AUTH_TIMEOUT=30
|
||||
|
||||
# ===== OCR Configuration =====
|
||||
# PaddleOCR model directory (inside container)
|
||||
PADDLEOCR_MODEL_DIR=/app/backend/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)
|
||||
# ===== File Configuration =====
|
||||
MAX_UPLOAD_SIZE=52428800
|
||||
# Allowed file extensions (comma-separated)
|
||||
ALLOWED_EXTENSIONS=png,jpg,jpeg,pdf,bmp,tiff,doc,docx,ppt,pptx
|
||||
# Upload directories (inside container)
|
||||
UPLOAD_DIR=/app/backend/uploads
|
||||
TEMP_DIR=/app/backend/uploads/temp
|
||||
PROCESSED_DIR=/app/backend/uploads/processed
|
||||
IMAGES_DIR=/app/backend/uploads/images
|
||||
|
||||
# ===== Export Configuration =====
|
||||
# Storage directories (inside container)
|
||||
STORAGE_DIR=/app/backend/storage
|
||||
MARKDOWN_DIR=/app/backend/storage/markdown
|
||||
JSON_DIR=/app/backend/storage/json
|
||||
EXPORTS_DIR=/app/backend/storage/exports
|
||||
|
||||
# ===== PDF Generation Configuration =====
|
||||
# Pandoc path (inside container)
|
||||
PANDOC_PATH=/usr/bin/pandoc
|
||||
# Font directory (inside container)
|
||||
FONT_DIR=/usr/share/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 (inside container)
|
||||
ARGOSTRANSLATE_MODELS_DIR=/app/backend/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
|
||||
# ===== Translation Configuration (DIFY API) =====
|
||||
ENABLE_TRANSLATION=${ENABLE_TRANSLATION:-false}
|
||||
DIFY_BASE_URL=${DIFY_BASE_URL:-}
|
||||
DIFY_API_KEY=${DIFY_API_KEY:-}
|
||||
DIFY_TIMEOUT=120.0
|
||||
|
||||
# ===== CORS Configuration =====
|
||||
# Allowed origins (comma-separated, * for all)
|
||||
# For Docker, use the external URL
|
||||
CORS_ORIGINS=http://localhost:12010,http://127.0.0.1:12010
|
||||
|
||||
# ===== Logging Configuration =====
|
||||
LOG_LEVEL=INFO
|
||||
LOG_FILE=/app/backend/logs/app.log
|
||||
|
||||
Reference in New Issue
Block a user