A Gamers Grind / XFGN / LM
Status
  • 🖥️www.agamersgrind.com
  • 🏙️--- Public Files ---
    • 👋Welcome, friends
    • ⛑️I need help!
    • ☕Buy me a Coffee
  • 📚Guides
    • Mini Guides
      • Valheim FPS Boost
      • Redirect domain to Google Site
      • Docker Compose
        • 'All' Compose File
        • Add Health Check to Container
        • Mount NFS Share to Container
        • Map hostname to container
    • Portainer and GitOps
      • Set up GitHub
      • Install Portainer
      • Create your first GipOps Compose file
      • Deploy your first GitOps stack
      • Managing your production compose files
    • Cloudflare
      • Domains
      • Generate an API Key
      • Tunnel
        • Create a Tunnel
        • Create a Proxy (Public Hostname)
        • Access Groups & Authentication
      • Dynamic DNS
    • Pterodactyl
      • Creating a new Panel
      • Creating a new Wings node
      • Join servers via domain
      • Configuring your Node Database
      • Server Best Practices & Suggestions
      • Troubleshooting
  • 🎮Game Servers
    • Valheim Public
    • Valheim Private
    • MultiMC (Minecraft)
    • CreateCraft (Minecraft)
    • Insurgency Sandstorm
  • ⚔️AGG Moderation
    • ❔Creating a new Server
    • Approving Valheim Application
  • 🗄️Internal Documentation
Powered by GitBook
On this page
  • Set up your Repo
  • Create a Private Repo
  • Ensure Repo is Private
  • Somethings to think about
  • Create a Private Access Token for Portainer
  • Install Renovate Bot
  • Get your Repo ready
  • Install the Bot
  • Confirm the bot is installed

Was this helpful?

  1. Guides
  2. Portainer and GitOps

Set up GitHub

PreviousPortainer and GitOpsNextInstall Portainer

Last updated 1 year ago

Was this helpful?

Set up your Repo

Create a Private Repo

If you have a pre-existing repo you wish to use, skip the creation part.

Ensure Repo is Private

Somethings to think about

Private vs Public repo

I would recommend creating a Private repo so you can store private information, such as API keys in it.

If you're going to obfuscate your files with variables or secrets (which you will need to store elsewhere), you could make the repo Public. But in my opinion, its better to be safe than sorry.

Please note that the version history is also public, so if you accidentally save a password or API key its saved forever.

What to name your repo

Your repo should be named something you remember and unique to you. It doesn't really matter though. I would suggest something short so your repo url is short

Create a Private Access Token for Portainer

As your repo is private, you will need to create a PAC for Portainer to use and access the repo

  1. Click on your profile in the top right, then select Settings

  2. On the left, click on Developer Settings

  3. Click on Personal Access Tokens, then 'Tokens (classic)'

  4. Click on 'Generate new token', then select 'Classic'

  5. Input the below information\

  6. Scroll down and click on 'Generate Token'

  7. Save your PAC somewhere safe and smart

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

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

This code block tells the bot to watch any '.yml' or '.yaml' file in the 'docker-compose' folder

Install the Bot

  1. You can set renovate to run on all repo's you own, or only your repo created in this doco 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

Follow to install the bot

Click on 'Issues', you should see the Dependency Dashboard

📚

Time Required

10 Minutes

Difficulty

Low

Follow GitHubs documentation on creating a repo
Ensure your repo is set to private, or switch it to private
this link
You can expire the credential if you want, though this may break Portainer