Sign inSign up

bl4d3s/portainer_update_bot

By bl4d3s

•Updated almost 2 years ago

Telegram bot to interact with Portaine webhooks to update Stacks via commands.

Image
0

426

bl4d3s/portainer_update_bot repository overview

⁠Portainer Update Bot

C# License MIT Telegram

This project provides a Telegram bot⁠, to interact with Portainer⁠ webhooks to update Stacks via commands. Source code is available at: GitLab⁠

⁠Configuration

All configuration is done inside the config.toml file.

Per default the file should be located next to the executable. If you wish to modify this behaviour, an alternative file location can be set with the environment variable CONFIG_FILE.

  1. Create a Telegram bot with @BotFather.
  2. Configure the commands with @BotFather via:
    1. /mybots
    2. Select the new bot
    3. Select Edit bot
    4. Select Edit commands
    5. Reply with
      help - Display available commands
      update - Update a stack in given environment
      
  3. Configure the config.toml
    1. Set the bot token
    2. Configure the base url of your portainer instance (must be reachable from the bot instance)
    3. Configure all necessary environments and stacks with their respective webhooks

⁠Usage

Available commands are:

  • /help
  • /update <env> <stack>

⁠Docker

This bot can be hosted using docker (compose).

version: '3'
services:
  portainer_update_bot:
    container_name: portainer_update_bot
    image: bl4d3s/portainer_update_bot
    volumes:
      - /path/to/your/config.toml:/config.toml:ro
    networks:
      docker-local:

networks:
  docker-local:
    name: docker-local
    external: true

Tag summary

Content type

Image

Digest

sha256:eb5e88d68…

Size

12 MB

Last updated

almost 2 years ago

docker pull bl4d3s/portainer_update_bot