Creating a Twelve-Factor App with Docker That Also Works on Kubernetes
These 12 methodologies help you build flexible and resilient web applications with any tech stack.
https://12factor.net/ is a set of guidelines created by Heroku back in 2011. It’s the result of analyzing and scaling hundreds of thousands of applications on their platform.
Despite being originally written in 2011 it very much applies today. I’ve been following these philosophies for nearly a decade. The concepts transcend specific technologies and apply to working with Docker and Kubernetes today. Docker makes applying some of them much easier than we had it back in the day!
In this video we’ll go over the entire 12 factor guide together and see how to apply each factor to a few web apps that are running in Docker. Along the way I’ll also give my personal opinions on each factor.
# Going Over Each Factor Together
Timestamps
- 1:03 – What is the twelve-factor app and what are its main goals?
- 5:17 – It was originally written by someone working at Heroku back in 2011
- 5:56 – It’s aimed at developers and ops engineers
- 6:18 – I. Codebase
- 9:50 – II. Dependencies
- 15:12 – III. Config
- 25:20 – IV. Backing services
- 28:25 – V. Build, release, run
- 35:24 – VI. Processes
- 40:53 – VII. Port binding
- 45:56 – VIII. Concurrency
- 54:08 – IX. Disposability
- 1:02:15 – X. Dev / prod parity
- 1:15:38 – XI. Logs
- 1:20:53 – XII. Admin processes
- 1:27:42 – And we’re done, any questions?
References Links
- https://12factor.net
- https://github.com/nickjj/docker-flask-example
- https://github.com/nickjj/build-a-saas-app-with-flask
- https://github.com/nickjj/docker-rails-example
- https://github.com/nickjj/docker-phoenix-example
- https://github.com/nickjj/flask-static-digest
- https://github.com/nickjj/flask-db
- https://nickjanetakis.com/blog/why-i-prefer-running-nginx-on-my-docker-host-instead-of-in-a-container
- https://nickjanetakis.com/blog/best-practices-around-production-ready-web-apps-with-docker-compose
- https://github.com/basecamp/console1984
How many of the 12 factors do you like to aim to use? Let me know below.