Files
OCR/.env
egg e255039419 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>
2025-12-14 15:08:33 +08:00

50 lines
1.6 KiB
Bash

# 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 =====
# 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 =====
# Production port (different from development)
FRONTEND_PORT=12010
BACKEND_PORT=8000
# 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 =====
OCR_LANGUAGES=ch,en,japan,korean
OCR_CONFIDENCE_THRESHOLD=0.5
MAX_OCR_WORKERS=4
# ===== File Configuration =====
MAX_UPLOAD_SIZE=52428800
ALLOWED_EXTENSIONS=png,jpg,jpeg,pdf,bmp,tiff,doc,docx,ppt,pptx
# ===== 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 =====
CORS_ORIGINS=http://localhost:12010,http://127.0.0.1:12010
# ===== Logging Configuration =====
LOG_LEVEL=INFO