This is a hardware project to assist software development. The hardware comprises:
- A Raspberry Pi model 2 for $40
- 128 GB USB stick for $28
- 8GB SD card with Raspbian Jessie for $12
- A 16x2 LCD display for showing the IP address, $10
- A backup battery circuit for graceful shutdown of the RPi
- Maybe a nice case? But I have some extra bits that it might not leave room for.
For now this will be a vanilla Git server using GitWeb as a web interface. Later I might tinker with Gitlab or Gogs.
I did some tinkering in a Docker image before moving on to the physical RPi.
docker build -t gitbox .
docker run -d -p 80:80 -v /opt/git:/opt/git --name=gitbox gitbox
docker inspect --format='{{.NetworkSettings.IPAddress}}' gitbox
It's a good idea to put an entry for "gitbox" in /etc/hosts
of your dev machine.
Creating a git repo is a bit of a chore. Given a repository foo, do this.
git clone --bare foo foo.git
scp -r foo.git gitbox:/opt/git/foo.git