- Change FRONTEND_URL to full URL with /solventum-image-metadata path - Ensures CORS allows requests from correct origin Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
80 lines
2.1 KiB
Text
80 lines
2.1 KiB
Text
# Oliver Metadata Tool - FastAPI Backend Configuration
|
|
# Copy this file to .env and configure your values
|
|
|
|
# ======================
|
|
# Database Configuration
|
|
# ======================
|
|
|
|
# SQLite (default - simpler for migration)
|
|
DATABASE_URL=sqlite+aiosqlite:///./data/oliver_metadata.db
|
|
|
|
# PostgreSQL (optional - for production)
|
|
# DATABASE_URL=postgresql+asyncpg://oliver:YOUR_PASSWORD@localhost:5432/oliver_metadata
|
|
# DB_PASSWORD=changeme
|
|
|
|
# ======================
|
|
# Redis Configuration
|
|
# ======================
|
|
REDIS_URL=redis://localhost:6379/0
|
|
|
|
# ======================
|
|
# Security
|
|
# ======================
|
|
|
|
# Secret key for JWT tokens (CHANGE IN PRODUCTION!)
|
|
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
|
|
SECRET_KEY=your-secret-key-change-in-production
|
|
|
|
# ======================
|
|
# OpenAI API (for AI metadata generation)
|
|
# ======================
|
|
|
|
# Required for AI metadata generation
|
|
OPENAI_API_KEY=your-openai-api-key-here
|
|
|
|
# Optional AI configuration
|
|
AI_MODEL=gpt-4o-mini
|
|
MAX_TOKENS=500
|
|
TEMPERATURE=0.5
|
|
|
|
# ======================
|
|
# Microsoft SSO (optional)
|
|
# ======================
|
|
|
|
# Production values for ai-sandbox.oliver.solutions
|
|
AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
|
|
AZURE_CLIENT_SECRET=
|
|
AZURE_TENANT_ID=e519c2e6-bc6d-4fdf-8d9c-923c2f002385
|
|
REDIRECT_URI=https://ai-sandbox.oliver.solutions/solventum-image-metadata/
|
|
|
|
# Local development:
|
|
# REDIRECT_URI=http://localhost:5001/auth/microsoft/callback
|
|
|
|
# ======================
|
|
# Application Settings
|
|
# ======================
|
|
|
|
# Backend port (default: 5001 - same as old Flask for Azure AD compatibility)
|
|
BACKEND_PORT=5001
|
|
|
|
# Upload directory (default: ./uploads)
|
|
UPLOAD_DIR=./uploads
|
|
|
|
# Frontend URL for CORS (optional)
|
|
# Production: full URL with path
|
|
FRONTEND_URL=https://ai-sandbox.oliver.solutions/solventum-image-metadata
|
|
# Local dev:
|
|
# FRONTEND_URL=http://localhost:3000
|
|
|
|
# Debug mode (true/false)
|
|
DEBUG=false
|
|
|
|
# ======================
|
|
# Tesseract OCR (optional)
|
|
# ======================
|
|
# TESSERACT_PATH=/usr/bin/tesseract
|
|
|
|
# ======================
|
|
# FFmpeg (optional)
|
|
# ======================
|
|
# FFMPEG_PATH=/usr/bin/ffmpeg
|