Files
rhema-together/deploy/helm/rhema-together
vhaudiquet b5babb682e build: depend on the Rhema crates by version
The manifest pointed at `../rhema`, so a build needed that checkout
beside the repository. CI cloned it in two jobs and the Dockerfile
cloned a tag and rewrote the paths. The committed lock had drifted to
0.5.1 entries after the framework bumped to 0.5.2, so the first cargo
command in a clean tree rewrote it.

All twelve crates are on crates.io at 0.5.2, so the manifest names that
version and the lock pins it. The clone steps, the `RHEMA_REF`
argument, and the path rewrite are gone from the workflows and the
image. Moving the framework now means `cargo update` on the `rhema-*`
packages.
2026-11-30 22:42:01 +01:00
..

Rhema Together Helm chart

This chart runs one rhema-together pod with a persistent volume for the SQLite database and the master key. The pod serves the API, the built client, the terminal WebSocket, the event stream, and the preview proxy.

Published artifacts

CI publishes on every push to main:

  • image git.vhaudiquet.fr/vhaudiquet/rhema-together:latest and :<commit>;
  • chart rhema-together versioned 0.1.0-<UTC timestamp>, with appVersion set to that commit. The image tag defaults to appVersion, so a chart deploys the image built from the same commit.

A v* tag publishes the exact version and a stable image tag, plus the exact-version chart. The chart repository is:

helm repo add vhaudiquet https://git.vhaudiquet.fr/api/packages/vhaudiquet/helm
helm repo update
helm upgrade --install together vhaudiquet/rhema-together \
  --namespace together --create-namespace -f my-values.yaml

Build the image

docker build -t registry.example.com/rhema-together:0.1.0 .
docker push registry.example.com/rhema-together:0.1.0

Cargo.lock pins the Rhema crates, so the image builds the same framework version on every run. Move the crates together with cargo update -p rhema-core and the other rhema-* packages.

Values

Copy values.yaml and change at least these fields:

image:
  repository: registry.example.com/rhema-together
  tag: "0.1.0"

app:
  publicUrl: "https://together.example.com"
  previewOrigin: "https://preview.together.example.com"
  allowRegistration: false

ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "4m"
    nginx.ingress.kubernetes.io/proxy-buffering: "off"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
  hosts:
    - host: together.example.com
      paths:
        - path: /
          pathType: Prefix
    - host: "*.preview.together.example.com"
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: rhema-together-tls
      hosts:
        - together.example.com
        - "*.preview.together.example.com"

publicUrl and previewOrigin must match the hosts and scheme in the ingress. Cookies use Secure only when publicUrl starts with https://; if the browser reaches the app on a different origin, login fails or invite links point elsewhere.

The preview host is a wildcard because each preview gets a signed subdomain. Point *.preview.example.com at the ingress and issue a certificate for that wildcard. With cert-manager, that requires a DNS-01 solver for the zone; an HTTP-01 solver cannot issue wildcards.

The nginx annotations are not cosmetic. The event feed is server-sent events, so proxy buffering must be off. Avatar uploads are up to 2 MB, so the body size must exceed nginx's 1 MB default. The terminal and preview tunnels use WebSockets and long-lived connections, hence the timeouts.

Install

helm upgrade --install together deploy/helm/rhema-together \
  --namespace together --create-namespace \
  -f my-values.yaml

The first-run setup token is in the pod log:

kubectl logs deploy/together-rhema-together -n together | grep setup

Open the app, finish setup, add a provider and an SSH sandbox under Settings, then create a room.

Operational notes

  • Run one replica. The database is SQLite and preview tunnels and turn state live in the process. The chart refuses a higher replicaCount.
  • The chart uses Recreate, so an upgrade stops the old pod before the new one starts. A rolling update would put two writers on one SQLite file.
  • The data volume holds together.db, its WAL files, and secret.key. Losing secret.key makes the stored provider and SSH keys unreadable. Back up the volume, or snapshot the PVC, as one unit.
  • Registration is closed by default. Set app.allowRegistration: true only when any visitor should be able to make an account. Setup and invite links work with it closed.
  • A real account can add an SSH target, and the server then connects where that account says. Keep registration closed unless you trust everyone who can reach the signup page.
  • Preview hosts are signed capabilities that expire after 24 hours. Reloading the room mints a fresh address; a copied address works for that port until it expires.
  • The container runs as UID 10001 with a read-only root filesystem. /data and /tmp are writable. An existing PVC must be writable by GID 10001; the chart sets fsGroup for that.
  • Set app.previewOrigin: "" to disable previews. The ingress wildcard can then be removed.