Skip to main content

Upgrades

Keep your self-hosted Brainz Lab instance up to date.

Before Upgrading

  1. Check release notes for breaking changes
  2. Backup your database
  3. Test in staging if possible
  4. Plan for downtime (usually < 5 minutes)

Docker Compose Upgrade

1. Pull Latest Images

docker compose pull

2. Stop Services

docker compose down

3. Start with New Images

docker compose up -d

4. Run Migrations

docker compose exec platform rails db:migrate
docker compose exec recall rails db:migrate
docker compose exec reflex rails db:migrate

5. Verify

curl http://localhost:3000/up
curl http://localhost:4001/up
curl http://localhost:4002/up

Kubernetes Upgrade

With Helm

# Update repo
helm repo update

# Upgrade
helm upgrade brainzlab brainzlab/brainzlab \
  --namespace brainzlab \
  --values values.yaml

Rolling Update

Helm performs rolling updates by default. No downtime for most upgrades.

Version Pinning

Pin to specific versions:

Docker Compose

services:
  platform:
    image: ghcr.io/brainzlab/platform:v1.2.3

Helm

# values.yaml
platform:
  image:
    tag: v1.2.3

Rollback

Docker Compose

# Restore database backup
cat backup.sql | docker compose exec -T postgres psql -U postgres

# Use previous image
docker compose pull ghcr.io/brainzlab/platform:v1.2.2
docker compose up -d

Kubernetes

helm rollback brainzlab 1 --namespace brainzlab

Major Version Upgrades

Major versions (1.x → 2.x) may require:
  1. Database migrations - May take longer
  2. Configuration changes - New required variables
  3. API changes - Update SDK versions
Always read the upgrade guide for major versions.

Upgrade Schedule

We recommend:
  • Patch versions (1.2.x) - Upgrade within 1 week
  • Minor versions (1.x.0) - Upgrade within 1 month
  • Major versions (x.0.0) - Plan and test first

Notifications

Get notified of new releases:
  1. Watch the GitHub repository
  2. Subscribe to the changelog RSS feed
  3. Join the community Discord

Automated Upgrades

For non-critical environments, automate upgrades:
# Watchtower for Docker
watchtower:
  image: containrrr/watchtower
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
  command: --schedule "0 0 4 * * *"  # 4 AM daily
Don’t automate upgrades for production without testing.