Skip to main content

Forge: Forgejo (Git hosting, actions, etc)

shinyspace runs a Forgejo instance. This is so we can easily work together with people who are used to e.g. GitHub workflows.

Forgejo has a dedicated VM: forgejo1 

on it, there's a user "shinypod" that has podman permissions (subid/subgid stuff) and is configured to run Podman on (2024) Debian 11 without root, meaning /etc/containers/containers.conf had to be adjusted to use cgroupfs.

the Forgejo pod was created with:

podman run -d \
  --name forgejo \
  --restart=always \
  -v ./forgejo:/data \
  -v /etc/timezone:/etc/timezone:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -p 3000:3000 \
  -p 2222:22 \
  codeberg.org/forgejo/forgejo:7

which, if ran on a new system, should create the latest version of forgejo7 (such as 7.4). Persistent data is in the ./forgejo directory, that's why it is mounted with the -v option.

Updates should be easy and smooth on forgejo 7. updating to 8 is likely going to require manual intervention.

 

A forgejo runner was set up for the shiny.space organisation, so any repos belonging to that can use it. it runs on a dedicated VM runner1 with Docker (as the required container sockets come with docker per default, but require extra setup on podman). 

it was created (after installing dependencies such as docker) with the command

./forgejo-runner register --no-interactive --token <TOKEN> --name runner --instance https://forge.shiny.space --labels docker:docker://node:16-bullseye,self-hosted

and started as a systemd service running /root/forgejo-runner daemon