add soft serve maintenance

This commit is contained in:
Malin Freeborn 2025-03-02 18:15:59 +01:00
parent fb157895fb
commit 1732c62734
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,24 @@
---
title: "Soft Serve Maintenance"
tags: [ "data", "git server", "maintenance" ]
required: [ "git", "nginx" ]
---
Over time git repositories become bloated with old data, but never get cleaned.
I can't find an official way to clean up the crud, so I did this:
```sh
usermod -aG soft-serve $USER
# Log out and back in for this to take effect.
cd /var/lib/soft-serve/data/repos
sudo chmod -R g+w *
git config --global --add safe.directory '*'
du -sh *.git
for repo in *.git; do
git -C "$repo" gc
done
du -sh *.git
$EDITOR ~/.gitconfig
# You should remove having everything marked 'safe'.
```

View File

@ -34,7 +34,7 @@ Restart the `soft-serve` service, then check it's working by cloning from localh
git clone http://localhost:23232/${some_repo}.git git clone http://localhost:23232/${some_repo}.git
``` ```
## `https` Setup ### `https` Setup
Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard certificates with [nginx](../networking/website/nginx.md). Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard certificates with [nginx](../networking/website/nginx.md).
@ -68,3 +68,4 @@ Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard ce
} }
``` ```

8
data/soft.md Normal file
View File

@ -0,0 +1,8 @@
---
title: "Soft-Serve"
tags: [ "data", "git server", "lfs", "TUI" ]
required: [ "git", "nginx" ]
---
- [Soft-Serve with https](soft-serve/soft_https.md)
- [Maintenance](soft-serve/maintenance.md)