# Container Updates

## Install Renovate Bot

The Renovate Bot watches for dependancies and automatically creates merge requests to update the contents of your Repo. This allows you to update your containers outside of Portainer as well as review changes made etc.

### Get your Repo ready

1. Create a folder '.github' in the root of your repo
2. Create a folder 'docker-compose' in the root of your repo
3. In the '.github' folder, create a file 'renovate.json5' with the below contents

```json5
{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
        "config:base",
        ":disableRateLimiting"
    ],
    "docker-compose": {
        "fileMatch": ["docker-compose/.+\\.ya?ml$"]
    }
}
```

{% hint style="info" %}
This code block tells the bot to watch any '.yml' or '.yaml' file in the 'docker-compose' folder

Feel free to use a different directory or the root of the repo
{% endhint %}

### Install the Bot

1. Follow [this link ](https://github.com/marketplace/renovate)to install the bot
2. You can set renovate to run on all repo's you own, or only your repo created in this doco\
   \&#xNAN;*This is up to you. If you actually use GitHub for development, it may be best to select only this repo*

### Confirm the bot is installed

1. Browse to your GitHub repo
2. Click on 'Issues', you should see the Dependency Dashboard\
   ![](https://2051488357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDMsaMcCoquOA6E0a6DA%2Fuploads%2Fgit-blob-fe5fc01215f26cea99b46ce6670d331574d43bf9%2Fimage%20\(53\).png?alt=media)

### Updating the Compose file

When a new update is released, the renovate bot will create a pull request in your repo;

<figure><img src="https://2051488357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDMsaMcCoquOA6E0a6DA%2Fuploads%2Fgit-blob-2607783fde7c1ef2e740c1feaf39f68abaa586c8%2Fimage%20(61).png?alt=media" alt=""><figcaption><p>the 'home page' of a pull request</p></figcaption></figure>

We can see that this pull request is updating the package 'mariadb'. It is a minor update, going from version 10.5 to 10.11

Clicking on the 'Files changed' tab will list any files that will be updated;

<figure><img src="https://2051488357-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDMsaMcCoquOA6E0a6DA%2Fuploads%2Fgit-blob-84b182f731c0772b52541de8b7f075c8a4663bfc%2Fimage%20(34).png?alt=media" alt=""><figcaption><p>this pull request will replace the red line with the green line</p></figcaption></figure>

If we are happy with this update, we can click on the 'Merge pull request' button at the bottom of the homepage
