Module env

Module env 

Source
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

VariableTypeDefaultDescription
BROWSER_POOL_SIZEusize5Maximum pool size
BROWSER_WARMUP_COUNTusize3Warmup browser count
BROWSER_TTL_SECONDSu643600Browser TTL in seconds
BROWSER_WARMUP_TIMEOUT_SECONDSu6460Warmup timeout
BROWSER_PING_INTERVAL_SECONDSu6415Health check interval
BROWSER_MAX_PING_FAILURESu323Max ping failures
CHROME_PATHStringautoCustom 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-chrome

Constants§

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.env file.