1
This commit is contained in:
commit
5ecaaec269
56
Makefile
Normal file
56
Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
all:
|
||||
echo OK
|
||||
|
||||
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
|
||||
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}
|
||||
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
|
||||
|
||||
|
1
README.md
Normal file
1
README.md
Normal file
@ -0,0 +1 @@
|
||||
* <https://computingforgeeks.com/install-gitea-git-service-on-debian/>
|
10
download-gitea.sh
Executable file
10
download-gitea.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RELEASES_URL="https://api.github.com/repos/go-gitea/gitea/releases/latest"
|
||||
|
||||
RELEASE_URLS=$(curl --silent "${RELEASES_URL}" | jq -r '.assets[] | select (.name|test("linux-amd64")) | .browser_download_url')
|
||||
|
||||
|
||||
DOWNLOAD_URL=$(echo "${RELEASE_URLS}" | egrep "linux\-amd64$")
|
||||
|
||||
wget "${DOWNLOAD_URL}" -O "gitea-linux-amd64"
|
20
gitea.service
Normal file
20
gitea.service
Normal file
@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=Gitea (Git with a cup of tea)
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=mysql.service
|
||||
|
||||
[Service]
|
||||
LimitMEMLOCK=infinity
|
||||
LimitNOFILE=65535
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User=git
|
||||
Group=git
|
||||
WorkingDirectory=/var/lib/gitea/
|
||||
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
Restart=always
|
||||
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user