To handle our Docker fleets, we use Portainer. It's very good and other than a few small issues we haven't had a problem. As we have scaled up to over 50 servers across the world, all running Docker for our APIs, Webdav, FTP, and file serving servers, there are a lot of containers to handle. While you could say, "oh, just switch to Kubernetes, Docker swarms, or some other solution like Terraform!". No. That's a lot of work to deal with and rewriting our infrastructure is not something I feel like doing.
Okay, well then, just use the webhook redploys! Oh, really? Take a look at Portainer's pricing. Look at it. You really think I want to pay over $200 a month just so I can have basic CI/CD? Hell no. Each of our servers are over 80 cores, and some even go higher. We have over 50 nodes in our fleet. We would have to contact sales, and have them charge us an arm and a leg for a basic ass feature.
So no, I will not be doing that. Portainer gives you their API and it's pretty simple to use, so after about a half our, I concoted this fleet redeployment, which uses Python to update the stacks of our choosing. Every update, I find myself sitting around for up to an hour reploying all of our containers, and it is a waste of time, so I built this.
The most important thing is that <fleet_type> is the same name across all of your stacks across all of your endpoints. For example, if the stack name is "api" then <fleet_type> is "api". It will find all of your stacks with that name and redeploy them exactly as they are, but pulling the new images, which is all I wanted. Make sure that the stacks all are of the same name.
Then you just need the username and password of your main portainer instance (the host where the URL goes to), and you are off! Save yourself the $200+ they want for this basic feature, and be happy.