Build and test the server, client, and chart on every push. Main pushes publish the rolling image and a timestamped chart whose appVersion is the commit; v* tags publish exact and stable image tags.
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:latestand:<commit>; - chart
rhema-togetherversioned0.1.0-<UTC timestamp>, withappVersionset to that commit. The image tag defaults toappVersion, 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
The Dockerfile clones the Rhema framework at v0.5.1 because this
repository consumes its crates by path. Override the pin with
--build-arg RHEMA_REF=<tag> if you move the framework.
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, andsecret.key. Losingsecret.keymakes 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: trueonly 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.
/dataand/tmpare writable. An existing PVC must be writable by GID 10001; the chart setsfsGroupfor that. - Set
app.previewOrigin: ""to disable previews. The ingress wildcard can then be removed.