Skip to content

ContainrBotApi

Joshua Solanes edited this page May 3, 2026 · 1 revision

What Is The ContainrBotApi?

The ContainrBotApi is what interacts with your chosen container orchestrator on behalf of the ContainrBot chatbot.

Configuration

The following environment variables are supported by the ContainrBotApi:

Name Required Description
ORCHESTRATOR Yes The container orchestrator to use (Docker, Kubernetes, etc.)
CONTAINER_LIST Yes A JSON object array of containers ContainrBotApi can interact with. NOTE: Properties explained below.

CONTAINER_LIST Object Properties

  • FriendlyName: The name of the container that will be used by ContainrBot chatbot to interact with the container. This can be anything you want.
  • ContainerName: The name of the container or deploy in the container orchestrator.
  • Namespace: The namespace for the container. This is required for some container orchestrators (Kubernetes) and optional for others (Docker).

CONTAINER_LIST Example

"[{\"FriendlyName\": \"valheim\", \"ContainerName\": \"deploy\", \"Namespace\": \"valheim-server\"}, {\"FriendlyName\": \"cncnet\", \"ContainerName\": \"deploy\", \"Namespace\": \"cncnet\"}, {\"FriendlyName\": \"satisfactory\", \"ContainerName\": \"deploy\", \"Namespace\": \"satisfactory-server\"}, {\"FriendlyName\": \"test\", \"ContainerName\": \"deploy\", \"Namespace\": \"hello-world\"}]"

In the above example there are 3 containers ContainrBotApi can interact with:

  • valheim is the name ContainrBotApi and the ContainrBot chatbot will expect
    • deploy is the actual container/deployable name used when finding the container
    • valheim-server is the Namespace used when finding the container
  • cncnet is the name ContainrBotApi and the ContainrBot chatbot will expect
    • deploy is the actual container/deployable name used when finding the container
    • cncnet is the Namespace used when finding the container
  • test is the name ContainrBotApi and the ContainrBot chatbot will expect
    • deploy is the actual container/deployable name used when finding the container
    • hello-world is the Namespace used when finding the container

Example docker-compose.yaml:

services:
  containrbotapi:
    image: ghcr.io/josolanes/containrbot/containrbotapi:latest
    ports:
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      ORCHESTRATOR: docker
      CONTAINER_LIST: "[{\"FriendlyName\": \"hello\", \"ContainerName\": \"hello-world\", \"Namespace\": \"\"}]"
      
  hello-world:
    container_name: hello-world
    image: nginx

Clone this wiki locally