« Gitea » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 38 : | Ligne 38 : | ||
[Service] | [Service] | ||
Type=notify | Type=notify | ||
User=gitea | User=gitea | ||
Group=gitea | Group=gitea | ||
WorkingDirectory=/var/lib/gitea/ | WorkingDirectory=/var/lib/gitea/ | ||
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini | ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini | ||
Restart=always | Restart=always | ||
RestartSec=2s | |||
Environment=USER=gitea HOME=/home/gitea GITEA_WORK_DIR=/var/lib/gitea | Environment=USER=gitea HOME=/home/gitea GITEA_WORK_DIR=/var/lib/gitea | ||
WatchdogSec=30s | WatchdogSec=30s |
Version du 16 octobre 2023 à 13:35
Install on Ubuntu
Database Preparation
create database gitea character set 'utf8mb4' collate 'utf8mb4_general_ci'; create user 'gitea'@'localhost' identified by '[PWD]'; grant all privileges on gitea.* to 'gitea'@'localhost'; flush privileges; |
Installation from binary
# create a user to run Gitea sudo adduser --system --group --disabled-password gitea # create required directory structure sudo mkdir -p /var/lib/gitea/{custom,data,log} sudo chown -R gitea:gitea /var/lib/gitea/ sudo chmod -R 750 /var/lib/gitea/ sudo mkdir /etc/gitea sudo chown root:gitea /etc/gitea sudo chmod 770 /etc/gitea wget https://dl.gitea.com/gitea/1.20.5/gitea-1.20.5-linux-arm64 -O gitea sudo mv gitea /usr/local/bin sudo chown root:root /usr/local/bin/gitea sudo chmod 755 /usr/local/bin/gitea |
Run as service
/etc/systemd/system/gitea.service |
[Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target Wants=mariadb.service After=mariadb.service [Service] Type=notify User=gitea Group=gitea WorkingDirectory=/var/lib/gitea/ ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini Restart=always RestartSec=2s Environment=USER=gitea HOME=/home/gitea GITEA_WORK_DIR=/var/lib/gitea WatchdogSec=30s [Install] WantedBy=multi-user.target |