install-gitea/Makefile

70 lines
1.4 KiB
Makefile
Raw Normal View History

2024-01-08 10:48:54 +02:00
all:
echo OK
2024-01-23 11:09:05 +02:00
install: install-dependencies-debian create-user download-gitea create-directories install-gitea-binary install-systemd-service install-nginx
2024-01-08 10:48:54 +02:00
install-dependencies-debian:
apt -y install git vim bash-completion jq
apt -y install mariadb-server
git --version
create-user:
adduser --system --shell /bin/bash --gecos 'Git Version Control' \
--group --disabled-password --home /home/git git
download-gitea:
bash download-gitea.sh
install-gitea-binary:
cp -vf gitea-linux-amd64 /usr/local/bin/gitea
2024-01-23 11:09:05 +02:00
chmod +x /usr/local/bin/gitea
2024-01-08 10:48:54 +02:00
gitea --version
create-directories:
2024-01-23 11:09:05 +02:00
mkdir -vp /etc/gitea
mkdir -vp /var/lib/gitea/custom
mkdir -vp /var/lib/gitea/data
mkdir -vp /var/lib/gitea/indexers
mkdir -vp /var/lib/gitea/public
mkdir -vp /var/lib/gitea/logs
chown git:git /var/lib/gitea/data
chown git:git /var/lib/gitea/indexers
chown git:git /var/lib/gitea/logs
chmod 750 /var/lib/gitea/data
chmod 750 /var/lib/gitea/indexers
chmod 750 /var/lib/gitea/logs
2024-01-08 10:48:54 +02:00
chown root:git /etc/gitea
chmod 770 /etc/gitea
install-systemd-service:
cp -vf gitea.service /etc/systemd/system/gitea.service
enable-service:
systemctl daemon-reload
systemctl enable gitea
start:
systemctl start gitea
restart:
systemctl restart gitea
stop:
systemctl stop gitea
disable-service:
systemctl daemon-reload
systemctl disable gitea
status:
systemctl status gitea --no-pager
install-nginx:
apt -y install nginx