Dokumentiere Gitea-Einrichtung
This commit is contained in:
+106
@@ -0,0 +1,106 @@
|
||||
# Betrieb
|
||||
|
||||
## Status prüfen
|
||||
|
||||
```bash
|
||||
ssh root@217.160.208.251
|
||||
systemctl status gitea
|
||||
systemctl status nginx
|
||||
```
|
||||
|
||||
Kurzprüfung:
|
||||
|
||||
```bash
|
||||
systemctl is-active gitea
|
||||
systemctl is-active nginx
|
||||
curl -I https://git.madformed.de/
|
||||
```
|
||||
|
||||
## Logs
|
||||
|
||||
Gitea:
|
||||
|
||||
```bash
|
||||
journalctl -u gitea -n 100 --no-pager
|
||||
tail -n 100 /var/lib/gitea/log/gitea.log
|
||||
```
|
||||
|
||||
nginx:
|
||||
|
||||
```bash
|
||||
journalctl -u nginx -n 100 --no-pager
|
||||
tail -n 100 /var/log/nginx/access.log
|
||||
tail -n 100 /var/log/nginx/error.log
|
||||
```
|
||||
|
||||
Let's Encrypt:
|
||||
|
||||
```bash
|
||||
journalctl -u certbot.timer --no-pager
|
||||
certbot certificates
|
||||
```
|
||||
|
||||
## Neustart
|
||||
|
||||
```bash
|
||||
systemctl restart gitea
|
||||
systemctl reload nginx
|
||||
```
|
||||
|
||||
Nach Änderungen an nginx:
|
||||
|
||||
```bash
|
||||
nginx -t
|
||||
systemctl reload nginx
|
||||
```
|
||||
|
||||
## Benutzer verwalten
|
||||
|
||||
Benutzer werden vorzugsweise im Gitea-Webinterface durch einen Admin verwaltet.
|
||||
|
||||
CLI-Beispiel, falls nötig:
|
||||
|
||||
```bash
|
||||
runuser -u git -- /usr/local/bin/gitea admin user create \
|
||||
--config /etc/gitea/app.ini \
|
||||
--username beispiel \
|
||||
--email beispiel@example.com \
|
||||
--password 'PASSWORT_NICHT_DOKUMENTIEREN'
|
||||
```
|
||||
|
||||
## Backup
|
||||
|
||||
Für ein einfaches Backup sollten mindestens diese Pfade gesichert werden:
|
||||
|
||||
```text
|
||||
/etc/gitea/app.ini
|
||||
/var/lib/gitea
|
||||
/etc/nginx/sites-available/gitea
|
||||
/etc/letsencrypt
|
||||
```
|
||||
|
||||
Gitea kann zusätzlich einen eigenen Dump erzeugen:
|
||||
|
||||
```bash
|
||||
runuser -u git -- /usr/local/bin/gitea dump --config /etc/gitea/app.ini --work-path /var/lib/gitea
|
||||
```
|
||||
|
||||
## Updates
|
||||
|
||||
Gitea wurde als Binary installiert. Ein Update besteht grundsätzlich aus:
|
||||
|
||||
1. Backup erstellen.
|
||||
2. Neue Gitea-Binary von der offiziellen Quelle laden.
|
||||
3. Signatur prüfen.
|
||||
4. `/usr/local/bin/gitea` ersetzen.
|
||||
5. `systemctl restart gitea`.
|
||||
6. Weboberfläche und Logs prüfen.
|
||||
|
||||
## Hinweise
|
||||
|
||||
- SSHFS/macFUSE wurde lokal vorbereitet, aber nicht weiter benötigt.
|
||||
- Der produktive Weg für Administration ist SSH.
|
||||
- Der produktive Weg für Git-Nutzung ist Gitea über HTTPS oder SSH.
|
||||
- Gitea-CLI und Gitea-Weboberfläche sind unabhängig von `tea`.
|
||||
- `tea` wurde bei der Einrichtung nicht verwendet.
|
||||
|
||||
Reference in New Issue
Block a user