How to create work process for Docker in production. Now it works like this:
- Developer commit changes to VCS
- CI build Docker container with app
- Push to registry with latest tag
- docker-compose.yaml placed on server
- Pull new images and rerun it
But if we are have only one registry any developer can crash production.
How to create a work process to fix this.
The common way is to create different environment, for example, "dev", "acceptance".
The flow would be :
- A dev finish a feature. He deploys it like he's doing right now but in dev.
- If after some testing, and reviewing, the code can go to acceptance, you promote it (The important thing in "promoting" an artifact is to not rebuild it, to avoid last-minute changes that would modify the behaviour).
- After some more business testing, when the code can go to production, just repeat the previous step.
There is lot of resources you can find about making a Deployment Pipeline, and in technology, there is OpenShift and Fabric8, even if it's the big artillery for your case.