Review
- 2024-08-17 07:46
[!Summary] https://12factor.net/
一、Introduction #
I. Codebase #
One codebase tracked in revision control, many deploys 一份基准代码,多份部署
II. Dependencies #
Explicitly declare and isolate dependencies 显示声明依赖关系
III. Config #
Store config in the environment 在环境中存储配置
IV. Backing services #
Treat backing services as attached resources 把后端服务当作附加资源
V. Build, release, run #
Strictly separate build and run stages 严格分离构建和运行
VI. Processes #
Execute the app as one or more stateless processes 以一个或多个无状态进程运行应用
VII. Port binding #
Export services via port binding 通过端口绑定提供服务
VIII. Concurrency #
Scale out via the process model 通过进行模型进行扩展
IX. Disposability #
Maximize robustness with fast startup and graceful shutdown 快速启动和优雅终止可最大化健壮性
X. Dev/prod parity #
Keep development, staging, and production as similar as possible 尽可能的保持开发,预发布,线上环境相同
XI. Logs #
Treat logs as event streams 把日志当作时间流
XII. Admin processes #
Run admin/management tasks as one-off processes 后台管理任务当作一次性进程运行