update README gitea -> forgejo
This commit is contained in:
parent
003ab3d49e
commit
f633392be3
1 changed files with 30 additions and 29 deletions
|
|
@ -179,7 +179,7 @@ cp bin/jailstat.sh /var/xyzzy/bin/
|
||||||
|
|
||||||
## Nginx Setup
|
## Nginx Setup
|
||||||
|
|
||||||
Gitea first-time setup is easier with nginx + SSL already working.
|
Forgejo first-time setup is easier with nginx + SSL already working.
|
||||||
|
|
||||||
#### Basic Prep
|
#### Basic Prep
|
||||||
```
|
```
|
||||||
|
|
@ -233,22 +233,22 @@ systemctl restart nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Gitea Setup
|
## Forgejo Setup
|
||||||
|
|
||||||
All content lives under `/var/xyzzy`:
|
All content lives under `/var/xyzzy`:
|
||||||
|
|
||||||
```
|
```
|
||||||
cp bin/teaup.sh /var/xyzzy/bin/
|
cp bin/forgejo_*.sh /var/xyzzy/bin/
|
||||||
cd /var/xyzzy/bin
|
cd /var/xyzzy/bin
|
||||||
|
|
||||||
export TVER="1.21.8"
|
export FVER="7.0.7"
|
||||||
curl -L --output-dir /var/xyzzy/bin --remote-name-all \
|
curl -f -L --output-dir /var/xyzzy/bin --remote-name-all \
|
||||||
"https://github.com/go-gitea/gitea/releases/download/v${TVER}/gitea-${TVER}-linux-amd64" \
|
"https://codeberg.org/forgejo/forgejo/releases/download/v${FVER}/forgejo-${FVER}-linux-amd64" \
|
||||||
"https://github.com/go-gitea/gitea/releases/download/v${TVER}/gitea-${TVER}-linux-amd64.sha256"
|
"https://codeberg.org/forgejo/forgejo/releases/download/v${FVER}/forgejo-${FVER}-linux-amd64.sha256"
|
||||||
|
|
||||||
sha256sum -c "gitea-${TVER}-linux-amd64.sha256"
|
sha256sum -c "forgejo-${FVER}-linux-amd64.sha256"
|
||||||
chmod +x "gitea-${TVER}-linux-amd64"
|
chmod +x "forgejo-${FVER}-linux-amd64"
|
||||||
ln -s "gitea-${TVER}-linux-amd64" gitea
|
ln -s "forgejo-${FVER}-linux-amd64" forgejo
|
||||||
```
|
```
|
||||||
|
|
||||||
Primary `git` user:
|
Primary `git` user:
|
||||||
|
|
@ -264,37 +264,38 @@ adduser \
|
||||||
git
|
git
|
||||||
```
|
```
|
||||||
|
|
||||||
Gitea prep:
|
Forgejo prep:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir -p /var/xyzzy/forge/{custom,data,log}
|
mkdir -p /var/xyzzy/forge/{custom,data,log}
|
||||||
chown -R git:git /var/xyzzy/forge/
|
chown -R git:git /var/xyzzy/forge/
|
||||||
chmod -R 750 /var/xyzzy/forge/
|
chmod -R 750 /var/xyzzy/forge/
|
||||||
mkdir -p /var/xyzzy/etc/gitea
|
mkdir -p /var/xyzzy/etc/forgejo
|
||||||
chown root:git /var/xyzzy/etc/gitea
|
chown root:git /var/xyzzy/etc/forgejo
|
||||||
chmod 770 /var/xyzzy/etc/gitea
|
chmod 770 /var/xyzzy/etc/forgejo
|
||||||
|
|
||||||
cp gitea.service /etc/systemd/system/
|
cp forgejo.service /etc/systemd/system/
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
```
|
```
|
||||||
|
|
||||||
Gitea init:
|
Forgejo init:
|
||||||
```
|
```
|
||||||
systemctl start gitea.service
|
systemctl start forgejo.service
|
||||||
( browser -> https://git.xyzzy.ee )
|
( browser -> https://git.xyzzy.ee )
|
||||||
systemctl stop gitea.service
|
systemctl stop forgejo.service
|
||||||
```
|
```
|
||||||
|
|
||||||
Gitea deploy: (app.ini needs secrets set)
|
Forgejo deploy: (app.ini needs secrets set)
|
||||||
|
|
||||||
```
|
```
|
||||||
cp custom/* /var/xyzzy/forge/custom/
|
cp custom/* /var/xyzzy/forge/custom/
|
||||||
cp app.ini /var/xyzzy/etc/gitea/
|
cp app.ini /var/xyzzy/etc/forgejo/
|
||||||
chmod 750 /var/xyzzy/etc/gitea
|
cp *secret *token /var/xyzzy/etc/forgejo/
|
||||||
chmod 640 /var/xyzzy/etc/gitea/app.ini
|
chmod 750 /var/xyzzy/etc/forgejo
|
||||||
chown root:git /var/xyzzy/etc/gitea/app.ini
|
chmod 640 /var/xyzzy/etc/forgejo/*
|
||||||
|
chown root:git /var/xyzzy/etc/forgejo/*
|
||||||
|
|
||||||
systemctl enable --now gitea.service
|
systemctl enable --now forgejo.service
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -308,7 +309,7 @@ systemctl restart apparmor.service
|
||||||
|
|
||||||
## Backup
|
## Backup
|
||||||
|
|
||||||
See `teabak.sh`; prep: (HCPING needs set in script)
|
See `forgejo_backup.sh`; prep: (HCPING needs set in script)
|
||||||
|
|
||||||
```
|
```
|
||||||
groupadd --system bkp
|
groupadd --system bkp
|
||||||
|
|
@ -316,12 +317,12 @@ mkdir /var/xyzzy/backup
|
||||||
chmod 0750 /var/xyzzy/backup
|
chmod 0750 /var/xyzzy/backup
|
||||||
chown git:bkp /var/xyzzy/backup
|
chown git:bkp /var/xyzzy/backup
|
||||||
|
|
||||||
cp teaback.sh /var/xyzzy/bin/
|
cp forgejo_backup.sh /var/xyzzy/bin/
|
||||||
chmod 0755 /var/xyzzy/bin/teabak.sh
|
chmod 0755 /var/xyzzy/bin/forgejo_backup.sh
|
||||||
|
|
||||||
cp teabak.service teabak.timer /etc/systemd/system/
|
cp forgejo_backup.service forgejo_backup.timer /etc/systemd/system/
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable --now teabak.timer
|
systemctl enable --now forgejo_backup.timer
|
||||||
```
|
```
|
||||||
|
|
||||||
Allow restricted backup user to rsync the data:
|
Allow restricted backup user to rsync the data:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue