_     _             
                        _ __ | |__ | | ___   __ _ 
                       | '_ \| '_ \| |/ _ \ / _` |
                       | |_) | | | | | (_) | (_| |
                       | .__/|_| |_|_|\___/ \__, |
                       |_|    ...2018-06-10 |___/ 

Hosting your own crap

So I guess it was time anyway, to host my own repositories.. I'll start out just with plain git, in two docker containers.. One for ssh access, read/write, and one for http access, for gitweb and git clone over http. Maybe if I remember, I will update thid document to explain what I.

First off, cloning the repos:

Easy enough, I made a text file called "list" with all the URLs, as they are on gitweb. (for example git@github.com:DusteDdk/SDL-Ball.git) one per line. Then I made a path /dockers/config/git/repos/ and in there I ran this bash: for R in `cat list`; do git clone --bare "$R"; done To populate it. To acommodate gitweb, I initialized the repos directory as an empty git repo.

This I created a docker container from debian, where I installed git and ruby.

Created a small entrypoint script which starts git instaweb and tails logs. Only the .git is owned by the user running in docker, and the other directories are read-only for that user.

Then the final things to do was link up nginx, update the config file and the

website with the new link. Which I will do now.

Done.. I found that it was most easy to host a git daemon to support

git cloning instead of cloning over http, that's an extra port to be routed, but other than that, all is good.