this post was submitted on 18 Apr 2025
35 points (88.9% liked)

Selfhosted

46304 readers
612 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I've got forgejo configured and running as a custom docker app, but I've noticed there's a community app available now. I like using the community apps when available since I can keep them updated more easily than having to check/update image tags.

Making the switch would mean migrating from sqlite to postgres, plus some amount of file restructuring. It'll also tie my setup to truenas, which is a platform I like, but after being bit by truecharts I'm nervous about getting too attached to any platform.

Has anyone made a similar migration and can give suggestions? All I know about the postgres config is where the data is stored, so I'm not even sure how I'd connect to import anything. Is there a better way to get notified about/apply container images for custom apps instead?

you are viewing a single comment's thread
view the rest of the comments
[–] jlh@lemmy.jlh.name 2 points 1 week ago (1 children)

Yeah, what you're talking about is called GitOps. Using git as the single source of truth for your infrastructure. I have this set up for my home servers.

https://codeberg.org/jlh/h5b

nodes has NixOS configuration for my 5 kubernetes servers and a script that builds a flash drive for each of them to use as a boot drive (same setup for porygonz, but that's my dedicated DHCP/DNS/NTP mini server)

mikrotik has a dump of my Mikrotik router config and a script that deploys the config from the git repo.

applications has all my kubernetes config: containers, proxies, load balancers, config files, certificate renewal, databases, clustered raid, etc. It's all super automated. A pretty typical "operator" container to run in Kubernetes is ArgoCD, which watches a git repo and automatically deploys any changes or desyncs back to the Kubernetes API so it's always in sync with git. I don't use any GUI or console commands to deploy or update a container, I just edit git and commit.

The kubernetes cluster runs about 400 containers, most of them just automatic replicas of services for high-availability. Of course there's always some manual setup steps outside of git, like partitioning drives, joining the nodes to the cluster, writing hardware-specific config, and bootstrapping Argocd to watch git. But overall, my house could burn down tomorrow and I would have everything I need to redeploy using this git repo, the secrets git repo, and my backups of my databases and container /data dirs.

I think Portainer supports doing GitOps on Docker compose? Never used it.

https://docs.portainer.io/user/docker/stacks/add

Argocd is really the gold standard for GitOps though. I highly recommend trying out k3s on a server and running ArgoCD on it, it's super easy to use.

https://argo-cd.readthedocs.io/en/stable/getting_started/

Kubernetes is definitely different than Docker Compose, and tutorials are usually written for Docker compose.yml, not Kubernetes Deployments, but It's super powerful and automated. Very hard to crash once you have it running. I don't think it's as scary as a lot of people think, and you definitely don't need more than one server to run it.

[–] irmadlad@lemmy.world 2 points 1 week ago

Man, I really appreciate all this info. Very helpful. It will take me some time to digest everything and put it into an action plan. I just thought, hey that would be cool and a nice project I can sink my teeth into and learn a lot on the way while deploying. Again, thank you for taking the time to give some direction and inspiration.