38 lines
967 B
Plaintext
38 lines
967 B
Plaintext
apt-get update
|
|
apt-get install -y git
|
|
|
|
adduser --system --shell /bin/bash --group --disabled-password --home /home/git git
|
|
wget -O gitea https://dl.gitea.io/gitea/1.9.6/gitea-1.9.6-linux-amd64
|
|
chmod +x gitea
|
|
sudo cp gitea /usr/local/bin/gitea
|
|
mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
|
|
chown git:git /var/lib/gitea/{data,indexers,log}
|
|
chmod 750 /var/lib/gitea/{data,indexers,log}
|
|
mkdir /etc/gitea
|
|
chown root:git /etc/gitea
|
|
chmod 770 /etc/gitea
|
|
|
|
|
|
wget https://raw.githubusercontent.com/go-gitea/gitea/master/contrib/systemd/gitea.service
|
|
uncomment postgresql.service
|
|
cp gitea.service /etc/systemd/system/
|
|
systemctl enable gitea
|
|
systemctl start gitea
|
|
|
|
## PostGreSQL
|
|
|
|
apt install postgresql
|
|
su postgres
|
|
createuser gitea
|
|
createdb gitea -O gitea
|
|
|
|
server {
|
|
listen 80;
|
|
server_name git.sessionkrkn.fr;
|
|
location / {
|
|
proxy_pass http://10.0.2.5:3000/;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
}
|
|
|