This commit is contained in:
root 2024-01-23 11:09:05 +02:00
parent 5ecaaec269
commit b0ced34e56
2 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,9 @@
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
@ -16,12 +19,22 @@ download-gitea:
install-gitea-binary:
cp -vf gitea-linux-amd64 /usr/local/bin/gitea
chmod +x /usr/local/bin/gitea
gitea --version
create-directories:
mkdir -p /etc/gitea /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 -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

View File

@ -7,4 +7,5 @@ RELEASE_URLS=$(curl --silent "${RELEASES_URL}" | jq -r '.assets[] | select (.nam
DOWNLOAD_URL=$(echo "${RELEASE_URLS}" | egrep "linux\-amd64$")
wget "${DOWNLOAD_URL}" -O "gitea-linux-amd64"
stat "gitea-linux-amd64" || \
wget "${DOWNLOAD_URL}" -O "gitea-linux-amd64"