Upgrades
Keep your self-hosted Brainz Lab instance up to date.
Before Upgrading
- Check release notes for breaking changes
- Backup your database
- Test in staging if possible
- Plan for downtime (usually < 5 minutes)
Docker Compose Upgrade
1. Pull Latest Images
2. Stop Services
3. Start with New Images
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:
- Database migrations - May take longer
- Configuration changes - New required variables
- 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:
- Watch the GitHub repository
- Subscribe to the changelog RSS feed
- 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.