Fix the Forgejo LAN runner: Python provisioning, Docker access, registry push (#4)

This commit is contained in:
emi 2026-07-21 06:46:04 +00:00
parent 9ffd9d1cfb
commit 871738d283

View file

@ -62,6 +62,13 @@ echo "==> Registering with $FORGEJO_URL (label: $LABELS)"
--name "thermograph-lan-$(hostname -s)" \
--labels "$LABELS"
echo "==> Runner config (docker.sock automount, so docker:-labeled jobs like"
echo " build-push.yml can actually run 'docker build/push' -- generated"
echo " config only overridden on the one setting that matters here)"
./forgejo-runner generate-config \
| sed 's/docker_host: "-"/docker_host: "automount"/' \
> "${RUNNER_DIR}/config.yaml"
echo "==> systemd --user unit"
mkdir -p "$HOME/.config/systemd/user"
cat > "$HOME/.config/systemd/user/forgejo-runner.service" <<EOF
@ -71,7 +78,7 @@ After=network-online.target
[Service]
WorkingDirectory=${RUNNER_DIR}
ExecStart=${RUNNER_DIR}/forgejo-runner daemon
ExecStart=${RUNNER_DIR}/forgejo-runner daemon -c config.yaml
Restart=on-failure
RestartSec=5