3. (Optional) Update runner config. Modify the `config.yaml` file as needed. [Official example config](https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml).
4. Bring the runners back up. Run `docker compose up -d` from the gitea directory.
Apparently a misconfigured Docker-in-Docker runner may sometimes retry registering over and over until the heat death of the universe. In that case you will end up with many "ghost" runners. In my case, 27,619. To resolve, you can either step through each one and click "edit", then "delete", then "confirm". Or you can just use the database.
1.`docker exec -it gitea_postgres psql --username "gitea"` To open a terminal inside the container and open a CLI session to the database.
2.`\c gitea` To select the 'gitea' database.
3.`DELETE FROM action_runner WHERE id NOT IN (50, 66);` To delete all entries except those with the IDs I wanted to keep.
We don't want to use Gitea's native auth. We want Keycloak to handle all our authentication. So we place a template override in the correct directory, which Gitea picks up on startup to generate the signin page.
The file [`signin_inner.tmpl`](signin_inner.tmpl) must be placed into `/data/gitea/templates/user/auth/`*inside the container*. In our case, that means `~/data/gitea/gitea/gitea/templates/user/auth/` on the host system.
For this to work properly, we use the following `app.ini` snippets: