Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude a dependency from Renovate updates

I use Renovate to keep my dependencies up-to-date. However there are some dependencies that I want to exclude from automatic updates, i.e. I don't want Renovate to update them, ever.

One such dependency is Postgres, which is specified in docker-compose.yml like so:

services:
  db:
    image: postgres:11

Currently, Renovate is creating PRs that would change the 11 to 15. Is there a configuration option in Renovate that allows me to exclude this dependency from Renovate?

like image 914
Antonio Dragos Avatar asked Feb 21 '26 07:02

Antonio Dragos


1 Answers

You want to use a package-rules.

This rule will disable updates for all dependencies found in docker compose files which have postgres in their name.

{
  "packageRules": [
    {
      "matchPackageNames": ["/postgres/"],
      "matchManagers": ["docker-compose"],
      "enabled": false
    }
  ]
}
like image 178
secustor Avatar answered Feb 25 '26 00:02

secustor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!