This commit is contained in:
parent
b2b58a0510
commit
7060ee7a71
3 changed files with 12 additions and 3 deletions
|
@ -12,5 +12,6 @@ jobs:
|
|||
image: ubuntu:24.04
|
||||
steps:
|
||||
- run: |
|
||||
apt update; apt install --yes curl
|
||||
apt-get update
|
||||
apt-get install --yes curl
|
||||
curl -s -o /dev/null https://ipv6.google.com
|
||||
|
|
|
@ -7,6 +7,7 @@ After=podman-socket.service
|
|||
ExecStart=/home/forgejo-runner/.local/bin/forgejo-runner daemon
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
WorkingDirectory=/home/forgejo-runner
|
||||
EnvironmentFile=/home/forgejo-runner/.runner-env
|
||||
|
||||
Restart=on-failure
|
||||
TimeoutSec=0
|
||||
|
|
|
@ -20,8 +20,9 @@ loginctl enable-linger forgejo-runner
|
|||
```bash
|
||||
# As root
|
||||
apt install -y podman
|
||||
echo "forgejo-runner:10000:12000" >> /etc/subuid
|
||||
echo "forgejo-runner:10000:12000" >> /etc/subgid
|
||||
|
||||
# Expand the subuid/subgid namespaces for the user, the default one is too small for privileged rootless-containers
|
||||
usermod --add-subuids 100000-200000 --add-subgids 100000-200000 forgejo-runner
|
||||
```
|
||||
|
||||
#### Enable Podman docker-socket on user
|
||||
|
@ -85,8 +86,14 @@ forgejo-runner register --instance "$RUNNER_INST_URL" --name "$RUNNER_NAME" --to
|
|||
|
||||
```bash
|
||||
# As forgejo-runner
|
||||
echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" > .runner-env
|
||||
echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> .runner-env
|
||||
|
||||
mkdir -p ~/.config/systemd/user
|
||||
# Download the file "docs/forgejo-runner.service" from this repository to "~/.config/systemd/user"
|
||||
# Or create a new file there and paste the contents.
|
||||
|
||||
|
||||
systemctl --user enable --now forgejo-runner
|
||||
# View logs by using:
|
||||
journalctl -xe --user-unit=forgejo-runner
|
||||
|
|
Loading…
Add table
Reference in a new issue