INSTALLATION.md 2.7 KB

Installation

This section provides a high-level requirement & quick start guide.

Hardware Requirements

  • A Raspberry Pi or $5 Digital Ocean Droplet is more than enough to get you started. Some even use 64MB RAM Docker CaaS.
  • 2 CPU cores and 512MB RAM would be the baseline for teamwork.
  • Increase CPU cores when your team size gets significantly larger, memory footprint remains low.

Prerequisites

Go Lang
curl -O https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz
sha256sum go1.11.linux-amd64.tar.gz
tar -xvf go1.11.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo mv go /usr/local
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Go Lang using Snap
sudo apt install gcc
sudo snap install go --classic
PostgreSQL (9.4 or higher)
sudo apt install postgresql postgresql-contrib
sudo update-rc.d postgresql enable
sudo service postgresql start
sudo su - postgres
createdb gitote
psql
ALTER USER postgres PASSWORD 'myPassword'
ALTER ROLE
\password
\q

Installation

  1. Make sure all the prerequisites are installed.
  2. Fork Gitote repository, ie. https://gitlab.com/gitote/gitote/forks/new

Create Git User

sudo adduser --disabled-login --gecos 'Gitote' git

Download and build Gitote

sudo su - git
mkdir -p $GOPATH/src/gitote
cd $GOPATH/src/gitote
git clone https://gitlab.com/gitote/gitote.git
or
git clone git@gitote.com:gitote/gitote.git
cd gitote
wget https://gitlab.com/gitote/bindata/raw/master/go-bindata
make bindata
go build
./gitote web -p 8080

Compiling the LESS

We're mostly a go app, with a bit of LESS sprinkled in. For most cases, simply running make will do. If you're working with LESS though, you'll need to run the following:

sudo apt install node-less
  • Run make less to compile all LESS files.

Run Gitote in Production

Setting up Gitote as a Service
cp script/systemd/gitote.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable gitote.service
sudo systemctl restart gitote.service
sudo systemctl status gitote.service
Installing NGINX
sudo apt install nginx
cp script/conf/gitote /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/gitote /etc/nginx/sites-enabled/gitote
sudo systemctl restart nginx
Setting up HTTPS
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
sudo certbot renew --dry-run # Renewal
Happy Coding ❤️