Setting up Mend Renovate Community Edition for GitLab.com on Fly.io
I've written about being a huge fan of Renovate before, and have been using it personally and professionally for a few years.
This model works well for a while, but at some point, losing out on the real-time updates on Pull/Merge Requests or through the Dependency Dashboard can make the app feel rather sluggish, especially if you've been using the hosted app on GitHub.
Fortunately Mend, the company behind Renovate, provide a free tool called Mend Renovate Community Edition (previously called Mend Renovate On-Prem) which wraps the Renovate Open Source project with the ability to react real-time to notifications.
The last couple of days I was clearing down the backlog of dependency updates I had to do in dependency-management-data and found that conflicts in the
go.sum between different dependency updates meant the upgrade process was fairly slow.
Because I've run Mend Renovate Community Edition before at work, I set about doing the same for my Open Source projects.
I've been using Fly.io for hosting all my apps recently, so set about doing the same for Mend Renovate Community Edition. All the code and config below can be found in the repo on GitLab.com.
We can use the following
Dockerfile for the app:
ENV MEND_RNV_CRON_JOB_SCHEDULER='0 * * * *'
Then, we can specify the secrets needed by Renovate with i.e.
flyctl secrets set MEND_RNV_WEBHOOK_SECRET=.....
You should scale down to 1 instance (as it doesn't horizontally scale):
flyctl scale count 1
And I've found that 1024MB is a good amount of memory to set for Mend Renovate Community Edition to work (it crashes with Out Of Memory (OOM) errors with the default minimal memory limit Fly gives you):
fly scale vm shared-cpu-1x
flyctl scale memory 1024
The Renovate On-Prem documentation for GitLab covers the definition of the variables, and what you need to do to get Webhooks set up.
Also, make sure you've turned off the ability for Fly to Automatically stop and start Machines.
Update 2023-09-28: Coming from Renovate On Prem? Check out the official migration docs and the changes I needed to make on my personal installation.