From ecfc6ccfea756ce42a82b7ffbaca3d8f06cb2759 Mon Sep 17 00:00:00 2001 From: Jens-Uwe Mager Date: Fri, 2 Oct 2026 22:21:54 +0200 Subject: [PATCH 1/4] Use tags to find the dir and dbdumps for restore easier, use stat to not hardcode user names. --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a1c544..5216fbf 100644 --- a/README.md +++ b/README.md @@ -372,28 +372,32 @@ export RESTIC_PASSWORD_FILE=$HOME/.restic-backup-hostXXX docker compose ls --format json|jq -r '.[]|.ConfigFiles' | while read yaml do dir=`dirname "$yaml"` + user=`stat --format '%U' $dir` if test -x "$dir/dumpdb.sh" then - sudo -u adminuser sh -c "cd $dir; ./dumpdb.sh" + sudo -u $user sh -c "cd $dir; ./dumpdb.sh" fi if test -x "$dir/dumpdbout.sh" then restic $VERBOSE backup \ + --tag db-backup \ --stdin-filename $dir/dumpdb.db \ --stdin-from-command -- \ - sudo -u adminuser sh -c "cd $dir; ./dumpdbout.sh" + sudo -u $user sh -c "cd $dir; ./dumpdbout.sh" fi done restic $VERBOSE backup --exclude-caches=true \ - /etc/docker /var/lib/docker \ + --tag dir-backup \ + /etc/docker /var/lib/docker \ /usr/local \ /home/adminuser /root restic $VERBOSE forget \ --keep-daily 7 --keep-weekly 5 --keep-monthly 12 \ --keep-yearly 100 --prune -chown -R adminuser:adminuser /home/adminuser/.cache/restic +ownergroup=`stat --format %U:%G $HOME` +chown -R $ownergroup $HOME/.cache/restic ``` This scripts assumes that the subdirectories for the docker containers From f15ee8a4b304dbbe8c8d916c7ea6adf31462d03c Mon Sep 17 00:00:00 2001 From: Jens-Uwe Mager Date: Wed, 7 Oct 2026 16:48:07 +0200 Subject: [PATCH 2/4] renamed to just runner, use the latest runner from gitea. --- act_runner/register.sh | 4 ---- {act_runner => runner}/data/.runner-redacted | 0 {act_runner => runner}/data/config.yaml | 0 {act_runner => runner}/docker-compose.yml | 8 ++++---- runner/register.sh | 4 ++++ 5 files changed, 8 insertions(+), 8 deletions(-) delete mode 100755 act_runner/register.sh rename {act_runner => runner}/data/.runner-redacted (100%) rename {act_runner => runner}/data/config.yaml (100%) rename {act_runner => runner}/docker-compose.yml (58%) create mode 100755 runner/register.sh diff --git a/act_runner/register.sh b/act_runner/register.sh deleted file mode 100755 index 6716286..0000000 --- a/act_runner/register.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -docker run --rm --entrypoint /usr/local/bin/act_runner \ - -v ./data:/data \ - -w /data -it gitea/act_runner:nightly register diff --git a/act_runner/data/.runner-redacted b/runner/data/.runner-redacted similarity index 100% rename from act_runner/data/.runner-redacted rename to runner/data/.runner-redacted diff --git a/act_runner/data/config.yaml b/runner/data/config.yaml similarity index 100% rename from act_runner/data/config.yaml rename to runner/data/config.yaml diff --git a/act_runner/docker-compose.yml b/runner/docker-compose.yml similarity index 58% rename from act_runner/docker-compose.yml rename to runner/docker-compose.yml index 055252c..15ca49d 100644 --- a/act_runner/docker-compose.yml +++ b/runner/docker-compose.yml @@ -1,10 +1,10 @@ -name: act_runner +name: runner services: - act_runner: - container_name: act_runner + runner: + container_name: runner restart: always network_mode: host - image: gitea/act_runner:nightly + image: gitea/runner:latest volumes: - ./data:/data - /var/run/docker.sock:/var/run/docker.sock diff --git a/runner/register.sh b/runner/register.sh new file mode 100755 index 0000000..3be550a --- /dev/null +++ b/runner/register.sh @@ -0,0 +1,4 @@ +#!/bin/sh +docker run --rm --entrypoint /usr/local/bin/runner \ + -v ./data:/data \ + -w /data -it gitea/runner:latest register From 7963e6775267dc06249a890c3ca6c057cdcdcc3c Mon Sep 17 00:00:00 2001 From: Jens-Uwe Mager Date: Wed, 7 Oct 2026 16:50:59 +0200 Subject: [PATCH 3/4] rename the directory in the README as well --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5216fbf..2fbaaea 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ HTTP_PORT = 3000 HTTP_ADDR = /run/containers/gitea.sock ``` -The act_runner directory contains the docker compose setup for a gitea +The runner directory contains the docker compose setup for a gitea runner. I do run that on a few nodes, but not on the node that runs gitea itself. If the runner nodes need to update via watchtower, make sure they are running in your tailnet. Before you start, run the register.sh script From b1f002250261b22a645ca6fdc69706e0bf8892fe Mon Sep 17 00:00:00 2001 From: Jens-Uwe Mager Date: Thu, 8 Oct 2026 08:45:45 +0200 Subject: [PATCH 4/4] fix typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fbaaea..25de58f 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ slightly different in the way they are using caddy: The caddy subdirectory showcases a typical caddy configuration. I do run caddy in its container with host networking instead of running it in the typical -bridged network environment the other containser run. This is necessary so that +bridged network environment the other containers run. This is necessary so that caddy can create the proper X-Forward-For headers and put correct client ip addresses in the log. Some services like nextcloud are also very picky and will not work properly if the trusted proxy configuration is not right. If you have a