I'm using EB to run multiple Docker containers using there multi docker configuration which makes use of ECS.
I want to find out how I can manage container rollbacks? At the moment if I push something to GitHub, my code-pipeline initiates a code-build, my code-build then push the built container to our ECS registry with the latest tag.
I have setup my image inside the container definition which points to the latest container. Now I believe EB automatically pulls the new containers - This can cause problem as I don't have a way to fallback to the previous version if something fails inside of it.
Our flow looks like this:
- Push to git
- Codebuild -> Push built container to ECS registry
- EB points to the latest image
What our flow needs to look like:
- Push to git
- Codebuild -> Push built container to ECS registry
- EB points to the latest image
- Does the node app fail? Is there an error? If so: roll back to the previous container version
Latest tag is evil, especially with autoscaling group.
As I can see you have 2 options