|
Some checks failed
Build C++ Hello World Docker Image / build (push) Failing after 26s
|
||
|---|---|---|
| .forgejo/workflows | ||
| demo | ||
| docker-compose.yaml | ||
| org.forgejo.runner.plist | ||
| README.md | ||
Based on the guide found at Forgejo Runner Setup
MacOS Instructions
- Grab the binary for the runner
- Put it at
/usr/local/bin
Setting up Forgejo Runner as a launchd Daemon
To run the Forgejo Runner as a background service on macOS, you can use launchd.
-
Configure the
forgejo-runner.plistfile: Theforgejo-runner.plistfile needs to be configured with the correct paths. Use~/.config/forgejo-runnerfor the runner's working directory and log files. Theforgejo-runner.plistfile in this directory has been updated to reflect this. -
Create the configuration directory: This directory will store the runner's configuration and log files.
mkdir -p ~/.config/forgejo-runner -
Move the
forgejo-runner.plistto LaunchAgents: The~/Library/LaunchAgents/directory is the standard location for user-specificlaunchdservices.mv forgejo-runner.plist ~/Library/LaunchAgents/org.forgejo.runner.plist -
Load the
launchdservice: This command registers the service withlaunchd.launchctl load ~/Library/LaunchAgents/org.forgejo.runner.plist -
Start the
launchdservice: This command starts the runner service. SinceRunAtLoadis set totruein the plist, it will also start automatically on login.launchctl start org.forgejo.runner
Managing the Forgejo Runner Service
Here are some useful commands to manage Forgejo Runner's launchd service:
- Check status:
launchctl list | grep org.forgejo.runner - Stop the service:
launchctl stop org.forgejo.runner - Start the service (if stopped):
launchctl start org.forgejo.runner - Unload the service (to prevent it from starting on login):
launchctl unload ~/Library/LaunchAgents/org.forgejo.runner.plist - Load the service (if unloaded):
launchctl load ~/Library/LaunchAgents/org.forgejo.runner.plist
Logs for the runner can be found in ~/.config/forgejo-runner/launchd.log and ~/.config/forgejo-runner/launchd.error.log.