I am wanting to automate some homelab things. Specifically deploying new and updating existing docker containers.

I would like to publish my entire docker compose stacks (minus env vars) onto a public Git repo, and then using something to select a specific compose from that, on a specific branch (so I can have a physical seperate server for testing) automatically deploy a container.

I thought of Jenkins, as it is quite flexable, and I am very willing to code it together, but are there any tools like this that I should look into instead? I’ve heard Ansible is not ideal for docker compose.

  • moonpiedumplings@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 hours ago

    I’m gonna be real: You want kubernetes + gitops (either fluxcd or argocd or the rancher one).

    I mean sure, jenkins works, but nothing is going to be as smooth as kubernetes. I originally attempted to use ansible as many people suggested, but I got frustrated becuase it struggled to manage state in a truly declarative way (e.g. when I would change the ports in the ansible files the podman containers wouldn’t update, I had to add tasks for destroying and recreating the containers).

    I eventually just switched to kubernetes + fluxcd. I push to the git repo. The state of the kubernetes cluster changes according. Beatiful. Simple. Encrypted secrets via sops. It supports the helm package manager as well. Complex af to set up though. But it’s a huge time saver in the long run, which is why so many companies use it.