Skip to content

My docker-compose.yml config / How to run bbctl in Docker compose #51

Description

@devnoname120

Example of docker-compose.yml file with all supported services (except imessage):

x-bbctl-template: &bbctl
  image: ghcr.io/beeper/bridge-manager:latest
  restart: unless-stopped
  entrypoint: ['/usr/local/bin/bbctl', 'run', '--no-override-config']
  volumes:
    - ./data:/data
  environment:
    MATRIX_ACCESS_TOKEN: ${MATRIX_ACCESS_TOKEN}
    BBCTL_CONFIG: /data/bbctl.json
    BEEPER_ENV: prod
    DATA_DIR: /data
    DB_DIR: /data/db
  env_file: .env
  labels:
    com.centurylinklabs.watchtower.scope: beeper

services:
  rcs:
    <<: *bbctl
    command: sh-mautrix-rcs
  whatsapp:
    <<: *bbctl
    command: sh-mautrix-whatsapp
  signal:
    <<: *bbctl
    command: sh-mautrix-signal
  telegram:
    <<: *bbctl
    command: sh-mautrix-telegram
  facebook:
    <<: *bbctl
    command: sh-mautrix-facebook
  instagram:
    <<: *bbctl
    command: sh-mautrix-instagram
  linkedin:
    <<: *bbctl
    command: sh-mautrix-linkedin
  twitter:
    <<: *bbctl
    command: sh-mautrix-twitter
  discord:
    <<: *bbctl
    command: sh-mautrix-discord
  slack:
    <<: *bbctl
    command: sh-mautrix-slack

If you want to have auto-updates you can add this additional service at the bottom:

  watchtower:
    image: ghcr.io/containrrr/watchtower:latest
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      WATCHTOWER_SCOPE: beeper
      WATCHTOWER_CLEANUP: 1
      WATCHTOWER_INCLUDE_RESTARTING: 1
    labels:
      com.centurylinklabs.watchtower.scope: beeper

Then in the same directory create a .env file and put your Matrix token inside:

MATRIX_ACCESS_TOKEN=syt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You can then start the containers:

docker compose up --detach --remove-orphans

Note: If you need to manually run a bbctl command you can always do something like this (here it's for logging in Beeper):

docker run --rm -it -v ./data:/data --env-file .env -e "BBCTL_CONFIG=/data/bbctl.json" -e "BEEPER_ENV=prod" -e "DATA_DIR=/data" -e "DB_DIR=/data/db" --entrypoint bbctl ghcr.io/beeper/bridge-manager:latest login

or

docker run --rm -it -v ./data:/data --env-file .env -e "BBCTL_CONFIG=/data/bbctl.json" -e "BEEPER_ENV=prod" -e "DATA_DIR=/data" -e "DB_DIR=/data/db" --entrypoint bbctl ghcr.io/beeper/bridge-manager:latest login-password

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions