Last active
May 20, 2026 16:50
-
-
Save holysoles/b67e186abcc10b27866a176094bd7f1e to your computer and use it in GitHub Desktop.
Beeper Bridges on k8s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: gmessages-bridge | |
| name: gmessages-bridge | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: gmessages-bridge | |
| strategy: | |
| type: Recreate # ideal since we're re-using login sessions | |
| template: | |
| metadata: | |
| labels: | |
| app: gmessages-bridge | |
| spec: | |
| containers: | |
| - image: harbor.donut.lan/github/beeper/bridge-manager:52074726c9756c3d20df6a5a8b0181faa8589415 # 'latest' on 2/23/26 | |
| name: gmessages-bridge | |
| env: | |
| - name: MATRIX_ACCESS_TOKEN | |
| valueFrom: | |
| secretKeyRef: | |
| name: beeper-secret | |
| key: access-token | |
| - name: BRIDGE_NAME | |
| value: sh-gmessages | |
| volumeMounts: | |
| - name: matrix-data | |
| subPath: "beeper-bridges/gmessages" | |
| mountPath: "/data" | |
| volumes: | |
| - name: matrix-data | |
| nfs: | |
| server: truenas-k8s.my.lan | |
| path: /mnt/tank/k8s-storage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: imessage-bridge | |
| name: imessage-bridge | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: imessage-bridge | |
| template: | |
| metadata: | |
| labels: | |
| app: imessage-bridge | |
| spec: | |
| containers: | |
| - image: ghcr.io/beeper/bridge-manager:latest | |
| imagePullPolicy: Always | |
| name: imessage-bridge | |
| env: | |
| - name: MATRIX_ACCESS_TOKEN | |
| valueFrom: | |
| secretKeyRef: | |
| name: beeper-secret | |
| key: access-token | |
| - name: BRIDGE_NAME | |
| value: sh-imessage | |
| volumeMounts: | |
| - name: beeper-data | |
| subPath: "beeper-bridges/imessage" | |
| mountPath: "/data" | |
| command: | |
| - /bin/bash | |
| - -c | |
| - | | |
| set -euf -o pipefail | |
| if [[ -z "${BRIDGE_NAME:-}" ]]; then | |
| if [[ ! -z "$1" ]]; then | |
| export BRIDGE_NAME="$1" | |
| else | |
| echo "BRIDGE_NAME not set" | |
| exit 1 | |
| fi | |
| fi | |
| export BBCTL_CONFIG=${BBCTL_CONFIG:-/tmp/bbctl.json} | |
| export BEEPER_ENV=${BEEPER_ENV:-prod} | |
| if [[ ! -f $BBCTL_CONFIG ]]; then | |
| if [[ -z "$MATRIX_ACCESS_TOKEN" ]]; then | |
| echo "MATRIX_ACCESS_TOKEN not set" | |
| exit 1 | |
| fi | |
| export DATA_DIR=${DATA_DIR:-/data} | |
| if [[ ! -d $DATA_DIR ]]; then | |
| echo "DATA_DIR ($DATA_DIR) does not exist, creating" | |
| mkdir -p $DATA_DIR | |
| fi | |
| export DB_DIR=${DB_DIR:-/data/db} | |
| mkdir -p $DB_DIR | |
| jq -n '{environments: {"\(env.BEEPER_ENV)": {access_token: env.MATRIX_ACCESS_TOKEN, database_dir: env.DB_DIR, bridge_data_dir: env.DATA_DIR}}}' > $BBCTL_CONFIG | |
| fi | |
| bbctl -e $BEEPER_ENV run --param 'bluebubbles_url=http://<blue bubbles server FQDN>:1234' --param 'bluebubbles_password=<password>' --param 'imessage_platform=bluebubbles' $BRIDGE_NAME | |
| volumes: | |
| - name: beeper-data | |
| nfs: | |
| server: truenas-k8s.my.lan | |
| path: /mnt/tank/k8s-storage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment