use crate::models::WatcherConfig; impl WatcherConfig { pub fn from_env() -> Result { // Load .env file (works in both Docker and local development) dotenvy::dotenv().ok(); let mut cfg = config::Config::builder() .add_source(config::Environment::with_prefix("WATCHER").separator("_")) .build()?; cfg.try_deserialize() } }