Prerequisites
- A running Forgejo server
Setup Renovate
Create user for Renovate
Create a new Forgejo user (I called it renovate-bot)
Create a Access token for the user in Settings > Applications with the permissions:
| activitypub | No access |
| admin | No access |
| issue | Read and write |
| misc | Read |
| notification | No access |
| organization | Read |
| package | No access |
| repository | Read and write |
| user | Read |
Take note of the token as it will only be shown once
Setup docker compose
Create a folder at ./renovate/data owned by 12021:12021
mkdir -p ./renovate/data
chown -R 12021:12021 ./renovate/dataCreate renovate config at ./renovate/config.yaml
gitAuthor: Renovate [bot] <[email protected]>
baseDir: /data
autodiscover: true
endpoint: https://git.example.com
platform: forgejo
token: [redacted]services:
renovate:
# Change to the current version of renovate
image: ghcr.io/renovatebot/renovate:43
container_name: forgejo_renovate
restart: no
environment:
RENOVATE_CONFIG_FILE: /config.yaml
volumes:
- ./renovate/config.yaml:/config.yaml:ro
- ./renovate/data:/dataSetup a cron job to run renovate once a day
Edit your crontab using crontab -e and add:
0 0 * * * docker compose -f /path/to/docker-compose.yml up
Replace the path with the actual path of your compose file
Test your deployment by starting the container
docker compose -f /path/to/docker-compose.yml upUsage
To use renovate in your repos, you’ll just have to add the renovate user to your repo with write permissions.