From 1732c627345b4b372d9034e0b8d5bfe38d4fdfa7 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Sun, 2 Mar 2025 18:15:59 +0100 Subject: [PATCH] add soft serve maintenance --- data/soft-serve/maintenance.md | 24 ++++++++++++++++++++++++ data/{ => soft-serve}/soft_https.md | 3 ++- data/soft.md | 8 ++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 data/soft-serve/maintenance.md rename data/{ => soft-serve}/soft_https.md (99%) create mode 100644 data/soft.md diff --git a/data/soft-serve/maintenance.md b/data/soft-serve/maintenance.md new file mode 100644 index 0000000..36cd1f1 --- /dev/null +++ b/data/soft-serve/maintenance.md @@ -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'. +``` diff --git a/data/soft_https.md b/data/soft-serve/soft_https.md similarity index 99% rename from data/soft_https.md rename to data/soft-serve/soft_https.md index 077091a..8dafb68 100644 --- a/data/soft_https.md +++ b/data/soft-serve/soft_https.md @@ -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 ``` -## `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). @@ -68,3 +68,4 @@ Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard ce } ``` + diff --git a/data/soft.md b/data/soft.md new file mode 100644 index 0000000..8f2c9ca --- /dev/null +++ b/data/soft.md @@ -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)