The Twelve-Factor App: Codebase, Dependencies, and Config

Topics covered
Popular Clips
Episode Highlights
Environment Variables
Environment variables are crucial for managing application settings without altering the code itself. Allen Underwood emphasizes that these variables should handle sensitive data like passwords and database connections, which vary across environments 1. This approach ensures that the code remains secure and adaptable, even if open-sourced. Joe Zack highlights the flexibility of environment variables, allowing different processes to run on the same machine without conflict 2. This orthogonality, or independence, is key to maintaining clean and efficient configurations.
You should never have to change the code. Your code should be able to run without those constants defined in the actual code.
--- Allen Underwood
Using environment variables also prevents the need for cumbersome file management, as they can be easily adjusted per session or environment.
  Â
Config Exposure
Avoiding the exposure of sensitive data in configuration files is a critical practice in application development. Joe Zack warns about the risks of having credentials in code, which could lead to severe consequences if the code is made public 3. Michael Outlaw discusses the importance of storing configuration data outside the codebase, such as in environment variables or machine-level configurations, to enhance security 4. This separation ensures that sensitive information is not accidentally checked into source control.
How fired would you be if your application was open sourced right now? Just a little fired or a lot fired?
--- Joe Zack
By keeping configurations separate, deployments become smoother and less error-prone, as the risk of overwriting critical settings is minimized.
Related Episodes
The Twelve-Factor App: Dev/Prod Parity, Logs, and Admin Processes
Answers 383 questionsThe Twelve-Factor App: Backing Services, Building and Releasing, Stateless Processes
Answers 383 questionsThe Twelve-Factor App: Port Binding, Concurrency, and Disposability
Answers 383 questions

3factor app - Async Serverless
Answers 383 questions3factor app - Reliable Eventing
Answers 383 questionsNDepends on How Good Your Code Is
Answers 383 questions

Clean Code - How to Build Maintainable Systems
Answers 383 questionsClean Code - Formatting Matters
Answers 383 questionsCaching in the Application Framework
Answers 383 questionsDesigning Data-Intensive Applications – Scalability
Answers 383 questionsClean Code - How to Write Amazing Functions
Answers 383 questionsASP.NET 5 - It's Basically Java
Answers 383 questions

Keyboards, Cloud Costs, Static Analysis, and Philosophy
Answers 383 questionsHow to be a Programmer
Answers 383 questions
Tackling Tough Developer Questions
Answers 383 questions
