Configure one app build for every environment

8 steps · about 1 h 40 min · Beginner

  1. Store config in the environment (article, The Twelve-Factor App, 10 min)

    The rule that separates config from code and builds.

  2. Separate build, release and run stages (article, The Twelve-Factor App, 10 min)

    Shows where config joins the build to make a release.

  3. Treat databases and queues as attached resources (article, The Twelve-Factor App, 10 min)

    Swap services by changing a URL, not code.

  4. Keep development close to production (article, The Twelve-Factor App, 10 min)

    Reduces bugs that only appear after deploy.

  5. Read environment variables in Node.js (tutorial, Node.js, 10 min)

    Covers process.env and loading a .env file natively.

  6. Load a local .env file safely (repo, GitHub, 10 min)

    The common loader and its advice on never committing .env.

  7. Validate settings with typed Python classes (reference, Pydantic, 20 min)

    Fails fast on missing or malformed settings at start-up.

  8. Layer config sources and profiles in Spring Boot (reference, Spring, 20 min)

    Shows precedence of files, env vars and profiles.