MogensR's picture
Create docker/.env.example
b65dc99
# BackgroundFX Pro Docker Environment Configuration
# Copy this file to .env and customize for your deployment
# ============================================================================
# Application Settings
# ============================================================================
# Gradio UI Settings
GRADIO_SERVER_NAME=0.0.0.0
GRADIO_SERVER_PORT=7860
GRADIO_ROOT_PATH=/
GRADIO_SHARE=false
# API Settings
API_HOST=0.0.0.0
API_PORT=8000
API_WORKERS=4
# Device Configuration
DEVICE=auto # auto, cuda, cpu
CUDA_VISIBLE_DEVICES=0
NVIDIA_VISIBLE_DEVICES=0
# ============================================================================
# Model Settings
# ============================================================================
MODEL_CACHE_DIR=/app/models
TORCH_HOME=/app/models/.cache
HF_HOME=/app/models/huggingface
DOWNLOAD_MODELS_ON_START=true
# Model selection
DEFAULT_SEGMENTATION_MODEL=rmbg-1.4
DEFAULT_MATTING_MODEL=modnet
ENABLE_TWO_STAGE=true
# ============================================================================
# Performance Settings
# ============================================================================
# Memory limits
MAX_MEMORY_GB=12
MAX_GPU_MEMORY_GB=8
MEMORY_CLEANUP_INTERVAL=100
# Processing settings
BATCH_SIZE=1
MAX_WORKERS=4
FRAME_SKIP=1
QUALITY_PRESET=high
# Cache settings
ENABLE_CACHE=true
CACHE_SIZE_MB=500
CACHE_TTL=3600
# ============================================================================
# Storage Settings
# ============================================================================
UPLOAD_DIR=/app/uploads
OUTPUT_DIR=/app/outputs
TEMP_DIR=/tmp/processing
LOG_DIR=/app/logs
# Size limits
MAX_UPLOAD_SIZE_MB=500
MAX_VIDEO_DURATION_SECONDS=600
# ============================================================================
# Redis Settings (for distributed deployment)
# ============================================================================
REDIS_ENABLED=true
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
# ============================================================================
# Security Settings
# ============================================================================
# Authentication
ENABLE_AUTH=false
AUTH_SECRET_KEY=change-this-secret-key-in-production
AUTH_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# CORS
CORS_ORIGINS=*
CORS_ALLOW_CREDENTIALS=true
# Rate limiting
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW_SECONDS=60
# ============================================================================
# Monitoring Settings
# ============================================================================
# Logging
LOG_LEVEL=INFO
LOG_FORMAT=json
ENABLE_ACCESS_LOG=true
# Metrics
ENABLE_METRICS=true
METRICS_PORT=9091
# Health checks
HEALTH_CHECK_PATH=/health
HEALTH_CHECK_INTERVAL=30
# ============================================================================
# Development Settings
# ============================================================================
DEBUG=false
RELOAD=false
PROFILE=false