4 ms·
My journey went like this: I ran git in a container "like you're supposed to" with https access but I wanted better management than adding user access to apach
by m463 6y ago
My journey went like this:
I ran git in a container "like you're supposed to" with https access but I wanted better management than adding user access to apache.
So I decided to upgrade to gitea. It was a pretty involved installation but I finally got it going. I set up a gitea cotnainer and was able to use it for a while. But one day it stopped working and I had to spend a bunch of time diagnosing why mariadb wasn't coming up. I can't recall exactly what i did (something with ib_logfile) but i finally got it going.
And a few days later when checking on it, I noticed it was using a bunch of cpu time. Apparently it uses resources just sitting there idle, like 5% cpu.
In the end, I made a git container again. I just used SSH access and one user: git
# pacman -S git
# useradd -m -G wheel -s /usr/bin/git-shell git
# systemctl enable sshd
repos are in ~/git/foo.git and ~/git/bar.git, ~/.ssh/authorized_keys for the hosts I give automated access to, password for others.
$ git clone git@gitmachine:git/foo.git
I liked the idea of git+https. And running gitea seemed like it would be like having my own git infrastructure!! But in my experience, git is easy with a minimal setup.
- simias 6y agoI recommend looking into gitolite, it's very simple and low maintenance and makes managing access a lot easier and with much more granularity than authorized_keys. It's basically just a simple perl script and a couple configuration files. It just work in my experience. If you end up scaling to the point where you have dozens of users and need to make regular changes to the config it becomes rather cumbersome, but for small groups of people (with a couple of build bots and the like that need read-only repo access) it's very well suited.
- dpedu 6y agoA database server? Gitea is as "involved" as you make it - mariadb certainly is not a requirement for Gitea. I've been using Gitea with sqlite for a couple years and upgrades have never ever been more complex than replacing the image with a new one. If minimality is a concern then you really can't get any simpler than `./gitea`.
- m463 6y agohmmm... I guess I learned something new from you. I followed these instructions setting it up: https://wiki.archlinux.org/index.php/gitea https://wiki.archlinux.org/index.php/gitea I see it does mention sqlite so that would have simplified things. I wonder if it would have prevented the container from using cpu. Now I'll have to spin up the gitea container again and experiment :)
- 3np 6y agoI’m on the contrary here; In my experience SQLite for these kinds of projects tend to become bottlenecks, failure points and/or corrupted eventually. As long as I pushed it forward, setting up a decent Postgres cluster with failover that I use over local file systems when available has been great. I groan a bit anytime don’t thing requires persisting configuration to the local file system during the lifetime of the process. Backups are a lot smoother too. The time invested does come back pretty quick.
- dpedu 6y agoThat's pretty surprising to hear, considering that SQLite is one of the most widely used pieces of software in existence and has a solid reputation. And the insane amount of testing they do - https://www.sqlite.org/testing.html https://www.sqlite.org/testing.html.
- 3np 6y agoI want to stress the (unfairly loosely defined) "these kinds of projects" there. There is nothing wrong with SQLite as such and in many situation it is perfect for the task. For a backend service that may need to scale, have availability requirements, is going to be run in a clustered or distributed environment, etc, it is not suitable. For one, you suddenly need to couple physical location of persisted data with usage of the same. Running it on networked filesystems is not supported. Yes, there are some caveats there and ways to work around it but it's a square-peg-round-hole kind of situation. For mobile or desktop apps, data jobs that can't be parallelized, local or light-weight analytics, embedded, it's great (though I do think many times it's used where something like leveldb or rocksdb would have been more appropriate but w/e). I'm sure there are other use-cases in both "great choice" and "terrible choice" I saw in the wild and can't recall. For something like gitea - it depends on the hosting environment,. requirements and scale. Obv for you it is not a pain-point, for me it absolutely is. --- I really appreciate when project give the user the choice, like they do here! ORMs are not the devil and can afford flexibility without having to spend time implementing for each supported backend specifically, if performance isn't critical enough that DB-specific optimizations are needed. IMO for a project that is going to be self-hosted by a wide range of users, it's often premature optimization to make the v1 tied to a specific DB.