2
This commit is contained in:
parent
5ecaaec269
commit
b0ced34e56
19
Makefile
19
Makefile
@ -1,6 +1,9 @@
|
|||||||
all:
|
all:
|
||||||
echo OK
|
echo OK
|
||||||
|
|
||||||
|
|
||||||
|
install: install-dependencies-debian create-user download-gitea create-directories install-gitea-binary install-systemd-service install-nginx
|
||||||
|
|
||||||
install-dependencies-debian:
|
install-dependencies-debian:
|
||||||
apt -y install git vim bash-completion jq
|
apt -y install git vim bash-completion jq
|
||||||
apt -y install mariadb-server
|
apt -y install mariadb-server
|
||||||
@ -16,12 +19,22 @@ download-gitea:
|
|||||||
|
|
||||||
install-gitea-binary:
|
install-gitea-binary:
|
||||||
cp -vf gitea-linux-amd64 /usr/local/bin/gitea
|
cp -vf gitea-linux-amd64 /usr/local/bin/gitea
|
||||||
|
chmod +x /usr/local/bin/gitea
|
||||||
gitea --version
|
gitea --version
|
||||||
|
|
||||||
create-directories:
|
create-directories:
|
||||||
mkdir -p /etc/gitea /var/lib/gitea/{custom,data,indexers,public,log}
|
mkdir -vp /etc/gitea
|
||||||
chown git:git /var/lib/gitea/{data,indexers,log}
|
mkdir -vp /var/lib/gitea/custom
|
||||||
chmod 750 /var/lib/gitea/{data,indexers,log}
|
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
|
chown root:git /etc/gitea
|
||||||
chmod 770 /etc/gitea
|
chmod 770 /etc/gitea
|
||||||
|
|
||||||
|
@ -7,4 +7,5 @@ RELEASE_URLS=$(curl --silent "${RELEASES_URL}" | jq -r '.assets[] | select (.nam
|
|||||||
|
|
||||||
DOWNLOAD_URL=$(echo "${RELEASE_URLS}" | egrep "linux\-amd64$")
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user