Advice for git setup
from Evilschnuff@feddit.org to selfhosted@lemmy.world on 04 Oct 12:35
https://feddit.org/post/19754383

I have a n100 server running proxmox and asustor drivestor2 pro nas.

I would like to setup a low maintenance git platform (with lfs) with backups for all of my code.

My current plan is to host forgejo and Postgres as lxc using the helperscripts installs and then store proxmox backups using the inbuilt backup tool via nfs on the nas. I am new to forgejo but heard that it uses much fewer resources than gitlab, which I am hosting in my job and have therefore more experience with.

Instead of lxc I could also host it in a vm and docker.

The n100 mainboard (asrock n100 dc itx) is a bit unstable, so backups that are easy to recover are important to me.

I want my setup to draw little power, that’s why I think gitlab and proxmox backup server are overkill.

I would also like to extend the setup with immich at some point, so anything that facilitates this would be best.

Any comments or suggestions?

#selfhosted

threaded - newest

credics@sh.itjust.works on 04 Oct 12:52 next collapse

I am hosting both Forgejo and Immich in Docker Containers. I use the example docker compose files from both projects with minimal changes to fit my setup. The volumes are mapped to a Synology NAS that is connected via NFS to the Docker host. Backup is another synology NAS at my parents house. I never had to restore, so I don’t know how easy that would be…

Evilschnuff@feddit.org on 04 Oct 13:21 collapse

But that means that the database is running on nfs, right? I read that this is not recommended due to locking issues and roundtime latency.

credics@sh.itjust.works on 04 Oct 13:33 next collapse

Yes. I didn’t have any problems so far. I guess, it’s because all my services are used by around four people, so the load is pretty low.

Mondez@lemdro.id on 04 Oct 14:01 next collapse

You can run a separate db server using local storage and use NFS only for the data volumes for the applications themselves.

rjc@lemmy.world on 05 Oct 17:14 collapse

Forgejo can run with Sqllite if you’re just hosting a small instance for your own purposes.

mhzawadi@lemmy.horwood.cloud on 04 Oct 13:47 next collapse

I run gogs and that looks to have LFS support, but depending on your requirements that might not be enough.

Evilschnuff@feddit.org on 04 Oct 15:33 collapse

From what I’ve read gitea is a fork of gogs and forgejo is a gitea fork so I should get similar benefits right?

erock@lemmy.ml on 05 Oct 14:51 next collapse

Why not just run bare repos on your n100? That’s what I do. I have no need for a code forge with code collab when it’s just me pushing

git-scm.com/…/Git-on-the-Server-Setting-Up-the-Se…

If you want a web viewer use a static site git viewer like pgit.pico.sh

Evilschnuff@feddit.org on 05 Oct 15:21 collapse

How would you handle LFS in this setup?

erock@lemmy.ml on 05 Oct 17:49 collapse

Stand up a local lfs server or figure out a different way to store large files. I generally avoid lfs

portnull@lemmy.dbzer0.com on 05 Oct 19:49 next collapse

Always going to throw charm.land/blog/self-hosted-soft-serve/ into the mix for the questions. Works great, supports LFS, configurable and admon over SSH, multi user support. All from a CLI and easy to setup

Gobidev@feddit.org on 05 Oct 21:49 collapse

Your plan sounds good to me.

I am using gitea (which afaik forgejo is a fork of) for the same reason, also on an n100, and it uses very few resources.

I use Debian lxc and deployed gitea in docker using ansible, but using the lxc helper scripts should also work great

For backups I use restic (running in another lxc) to push the files and DB dump directly to an external server, not the entire lxc