Gogs: Self-hosted Git Server in Docker

Updates and open questions about problems Harlan is working to solve and tools he is working with.
harlanji
Posts: 13
Joined: Mon Jul 24, 2023 6:44 pm

Gogs: Self-hosted Git Server in Docker

Post by harlanji »

A couple times now I've stood up a Gogs server for private use and imported some of my projects. I keep having my hosting shut off because I run out of money, or my RasPi SD card go read-only because of excessive writes for the non-performance graded cards I was using (my ignorance, now I know better). Once again git.harlanji.com is live and has been for a few days with some mirrored repos, but now I've got my first original code deployed: hogumathi-app.


Image

The key reason I don't house it on GitHub is because I haven't reviewed the AI training licensing. Technically being AGPL I'd be happy to train a model that complies with those terms, but I'm not certain it works that way. Another smaller reason is I've just always been bullish on self-hosting things despite going along with centralized / corporate offerings because it was popular--again, my mistake... not even ignorance here, just chose not to fight the battles.

The main reason I might mirror it to GitHub now is for discovery, and because I'm still afraid of running out of money again and losing this server. Each time I can be more prepared and ready to do a backup, etc.. It's good practice setting these up over and over but also I am looking forward to a time again where I can just run servers and not worry about the bill. I have a Patreon: harlanji and other means of tipping like Venmo and BuyMeACoffee (both harlanji) on Hogumathi: social.harlanji.com.

Here I'm backing the server on SQLite and using the internal SSH server on port 3022, exposing it to the world via basic Docker publication. For this repo there are no detailed commit messages because I was managing releases without Git due to lack of a client on my laptop, as I mentioned in the last post about setting up a virtual desktop in Docker. So I just extracted each version in succession, copied the .git folder into it, and added the changes. Git is good about finding renamed files in most cases, but there was one where I wanted to force it but decided this isn't worth a whole day of my life to figure out (here is a StackOverflow post about it).

I've talked a lot about the Hogumathi project itself in short form on Twitter; I'll have to get all those posts together and document it better now that there's a home for the project.