# =============================================================================
# html2pdf-api Configuration
# =============================================================================
# This file is loaded by the `env-config` feature using dotenvy.
# All values shown are defaults - uncomment and modify as needed.
#
# Cross-platform note: This file uses `app.env` instead of `.env` for
# better visibility and compatibility across different operating systems.
# =============================================================================
# -----------------------------------------------------------------------------
# Browser Pool Settings
# -----------------------------------------------------------------------------
# Maximum number of browsers to keep in the pool (idle + active)
# Higher values = more memory usage, better concurrency
# Lower values = less memory, potential queuing under load
BROWSER_POOL_SIZE=5
# Number of browsers to pre-create during warmup phase
# Must be <= BROWSER_POOL_SIZE
# Set to BROWSER_POOL_SIZE for fastest first requests
# Set to 0 for lazy initialization (browsers created on demand)
BROWSER_WARMUP_COUNT=3
# Browser time-to-live in seconds before forced retirement
# Prevents memory leaks from long-running browser processes
# Default: 3600 (1 hour)
BROWSER_TTL_SECONDS=3600
# Maximum time in seconds allowed for warmup process to complete
# BROWSER_WARMUP_TIMEOUT_SECONDS >= BROWSER_WARMUP_COUNT * 30
# Increase if running on slow hardware
BROWSER_WARMUP_TIMEOUT_SECONDS=180
# -----------------------------------------------------------------------------
# Health Monitoring Settings
# -----------------------------------------------------------------------------
# Interval in seconds between health check pings for active browsers
# Shorter = faster failure detection, higher overhead
# Longer = slower detection, lower overhead
BROWSER_PING_INTERVAL_SECONDS=15
# Maximum consecutive ping failures before removing a browser
# Higher values = more tolerance for transient failures
# Set to 1 for aggressive failure detection
BROWSER_MAX_PING_FAILURES=3
# -----------------------------------------------------------------------------
# Chrome Configuration
# -----------------------------------------------------------------------------
# Custom path to Chrome/Chromium binary (optional)
# If not set, the library will auto-detect Chrome location
#
# Examples:
# Linux: /usr/bin/google-chrome
# macOS: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
# Windows: C:\Program Files\Google\Chrome\Application\chrome.exe
#
# CHROME_PATH=/usr/bin/google-chrome
# -----------------------------------------------------------------------------
# Logging (for your application, not this library)
# -----------------------------------------------------------------------------
# Rust log level for the application
# Options: error, warn, info, debug, trace
# RUST_LOG=info
# Enable more detailed logging for html2pdf-api specifically
# RUST_LOG=html2pdf_api=debug,info