Devii · DevOps · 2026-01-12 · 6 min read

Share

Twelve-Factor App: Store Config In The Environment (And What That Implies)

Heroku’s published twelve-factor methodology: separate config from code-still a useful baseline for services.

The **Twelve-Factor App** is a documented methodology (published by Heroku, `12factor.net`) for building services that run well as cloud-native processes. **Factor III** states that configuration that varies between deploys-database URLs, credentials, feature flags-should live in the **environment**, not baked into source control.

“Environment” does not mean `.env` files committed to Git. It means the process receives config from the orchestrator: platform env vars, secret managers, or mounted files injected at runtime. Mature teams also rotate secrets, audit access, and avoid logging raw credentials.

Engineer reviewing application architecture
Engineer reviewing application architecture

The twelve factors are not law, but they remain a concise checklist for deploy parity between dev, staging, and production. Read the original factor descriptions rather than second-hand summaries when you adopt or reject them.