sources
1. One Codebase, many deploys
There should be one codebase for each microservice, i.e., one repo for each microservice. Microservices are loosely couple components that can be independently scaled,a dn deployed. Each repo is independently managed, pushed to produce one image. A single image is used to deploy multiple instances as containers.
2. Dependencies
3. Config
During development and deployment of a code, there are various parameters that vary between developments and deploys. While the parameters are structured in the config file to separate the variables that change the behavior of the code from the code itself, not every variables are apt for keeping inside the project’s config file. Many parameters that vary as the code transitions from development to deployment cycle, and also vary Dependending on the platform it is being worked on.
These parameters are stored in environment variables and the applicatons are required to fetch those variables using environments. As a rule of thumb, if a set of parameters vary between deelopment and deploys, they must be stroed in environment variables. A test to whether all the config has been factored out from the code is whether at any moment the code can be pushed to open source without compromisign with credentials.