70 lines
1.4 KiB
Makefile
70 lines
1.4 KiB
Makefile
all:
|
|
echo OK
|
|
|
|
|
|
install: install-dependencies-debian create-user download-gitea create-directories install-gitea-binary install-systemd-service install-nginx
|
|
|
|
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
|
|
chmod +x /usr/local/bin/gitea
|
|
gitea --version
|
|
|
|
create-directories:
|
|
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
|
|
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
|
|
|
|
|