GitOps for docker compose stacks
GitOps for docker compose stacks

In this guide I will go over how to automatically search for and be notified of updates for container images every night using Renovate, apply those updates by merging pull requests for them in Gitea, and automatically redeploy the updated containers using Komodo.
At one of my clients I use gitlab CI with ansible. It took 3 days to setup, and requires thinkering. But all in all, I like the versitility, consistency and transparency of this approach.
If I’d start over again, I’d use pyinfra instead of ansible, but that’s a minor difference.
I think it depends on the rate of change, rather than the amount of containers.
At home I do things manually as things change maybe 3 or 4 times a year.
Professionally I usually do setup automated devops because updates and deployments happen almost daily.
If feel like, for me at least, GitOps for containers is peace of mind. I run a small Kubernetes cluster as my home lab, and all the configs are in git. If need be, I know (because i tested it) if something happens to the cluster and I lose it all, I can spin up a new cluster and apply the configs from git and be back up and running. Because I do deployments directly from git, I know that everything in git is up to date and versioned so i can roll back.
I previously ran a set of docker containers with compose and then swarm, and I always worried something wouldn’t be recoverable. Adding GitOps here reduced my “What If?” Quotient tremendously.
Currently, I have a 3 node Proxmox cluster with 6 kube nodes on it (3 masters, 3 workers). Lets me do things like migrate services off of a host so I can take it out, do upgrades/maintenance, and put it back without hearing about downtime from the family/friends.
For storage, I’ve got a Synology NAS with NFS setup and then the pods are configured to use that for their storage if they need it (So, Jellyfin, Immich, etc). I do regular backups of the NAS with rsync. So, if that goes down, I can restore or standup a new NAS with NFS and it’ll be back to normal.