Expand description
Environment-based configuration loading.
This module is only available when the env-config feature is enabled.
§Environment File
This module uses dotenvy to load environment variables from an app.env
file in the current directory. The file is optional - if not found,
environment variables and defaults are used.
§Environment Variables
| Variable | Type | Default | Description |
|---|---|---|---|
BROWSER_POOL_SIZE | usize | 5 | Maximum pool size |
BROWSER_WARMUP_COUNT | usize | 3 | Warmup browser count |
BROWSER_TTL_SECONDS | u64 | 3600 | Browser TTL in seconds |
BROWSER_WARMUP_TIMEOUT_SECONDS | u64 | 60 | Warmup timeout |
BROWSER_PING_INTERVAL_SECONDS | u64 | 15 | Health check interval |
BROWSER_MAX_PING_FAILURES | u32 | 3 | Max ping failures |
CHROME_PATH | String | auto | Custom Chrome binary path |
§Example app.env File
# Browser Pool Configuration
BROWSER_POOL_SIZE=5
BROWSER_WARMUP_COUNT=3
BROWSER_TTL_SECONDS=3600
BROWSER_WARMUP_TIMEOUT_SECONDS=60
BROWSER_PING_INTERVAL_SECONDS=15
BROWSER_MAX_PING_FAILURES=3
# Chrome Configuration (optional)
# CHROME_PATH=/usr/bin/google-chromeConstants§
- ENV_
FILE_ NAME - Default environment file name.
Functions§
- chrome_
path_ from_ env - Get Chrome path from environment.
- from_
env - Load configuration from environment variables.
- load_
env_ file - Load environment variables from
app.envfile.