DB and Environment Detection Config