Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions act_runner/register.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions act_runner/docker-compose.yml → runner/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions runner/register.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
docker run --rm --entrypoint /usr/local/bin/runner \
-v ./data:/data \
-w /data -it gitea/runner:latest register
Loading