GitOps for docker compose stacks

https://piefed.social/post/1283831

Wondering, Just after how many containers does ops make sense? I have a dozen containers, I check for updates once a month manually. I update the compose/docker files manually and up my containers. In stages, because my git and my container registry are also containers. Also my dev is my prod env.

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.

How many hosts do you manage? What k8 tools do you use? I have just one host, I use bind mounts for container generated config/data/cache in docker compose, for which I dont have backup, and if gone, I have to start from scratch. But i try to keep most config in git.

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.