forgejo
This is an old revision of the document!
This page describes the process for configuring automatic pulls when a push is made to a repository on ForgeJo. Uses forgejorunner and a script in .forgejo/workflows in the repository files.
Optional: Create a new user with a homefolder so the runner doesn't use the same SSH user as you.
Set up Forgerunner:
- make a new directory and create a compose.yml file with the following:
services:
forgejo-runner:
hostname: forgerunner
image: code.forgejo.org/forgejo/runner:5.0.4
container_name: forgejorunner
environment:
DOCKER_HOST: unix:///var/run/docker.sock
user: 0:0 #Gives permission errors if not root. Can this be fixed somehow?
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
command: forgejo-runner -c /data/config.yaml daemon
- save it and create a new folder in the same directory called “data”
mkdir forgerunner
cd forgerunner
mkdir data
touch compose.yml
echo "services:
forgejo-runner:
hostname: forgerunner
image: code.forgejo.org/forgejo/runner:5.0.4
container_name: forgejorunner
environment:
DOCKER_HOST: unix:///var/run/docker.sock
user: 0:0 #Gives permission errors if not root. Can this be fixed somehow?
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
command: forgejo-runner -c /data/config.yaml daemon" > compose.yml
-
forgejo.1743139350.txt.gz · Last modified: by ryan