I’ve noticed that @moul is already working on an image:
… but thought, why be pinned down to specific OS version with something so loosely coupled like a Go application. So I’ve made a package for Debian/Ubuntu which I’d like to share with you.
You will need ≥30 MB space on disk and, for 1–2 users, 40–60 MB free memory.
# ubuntu ≥ 15.04 has ECDSA support, which is needed apt-get -y install apt-transport-https printf "deb https://s.blitznote.com/debs/ubuntu/armhf/ arm7/" \ > /etc/apt/sources.list.d/blitznote.list printf 'Package: *\nPin: origin "s.blitznote.com"\nPin-Priority: 510\n' \ > /etc/apt/preferences.d/blitznote apt-get update # redis-server is optional, but recommended apt-get install -y redis-server # This is not GPG signed, but pulled through HTTPS. # I sign packages with 'signify'. apt-get install -y --force-yes gogs
systemctl enable redis-server systemctl start redis-server
Run Gogs for the first time, to go through the installation screen, which will be filled with defaults I’ve selected having installations on Scaleway in mind. We do this manually here so you can spot errors early on:
sudo -u git -g git /bin/bash USER=git HOME=/var/lib/gogs /opt/gogs/gogs web # visit http://<your-ip>:80/ and go through installation # Remember to modify the domain name, and to create a first user at the very bottom of the page! # You can leave everything else as it is. # Terminate *gogs* by pressing ctrl+c. nano /opt/gogs/custom/conf/app.ini # Gogs has a bug and overwrite cache.ADAPTER and/or session.PROVIDER. # Please set it to "= redis". # You might want to tinker with logging verbosity later or change Gogs's port number. # press ctrl+x y to exit exit # no longer user 'git'
Nice! Let’s finalize everything by handing Gogs over to systemd:
systemctl enable gogs systemctl start gogs
Notable folders, backup these:
/srv/git— will contain the GIT repositories. If Scaleway’s object storage worked for me I would try to mount that directory from there. Or from a dedicated volume.
/var/lib/gogs— will contain everything non-ephemeral, not-cached, related to Gogs. Like custom avatars.