Update Guide
Update to Latest Version
Section titled “Update to Latest Version”Standard Update Process
Section titled “Standard Update Process”# Pull latest imagesdocker compose pull
# Restart services (database migrations run automatically)docker compose up -d
# Verify service statusdocker compose psView Update Logs
Section titled “View Update Logs”# View backend logsdocker compose logs backend
# Confirm migration successdocker compose logs backend | grep "migration"Update to Specific Version
Section titled “Update to Specific Version”Using Environment Variables
Section titled “Using Environment Variables”# Set version tagexport IMAGE_TAG=v1.2.0
# Or set in .env fileecho "IMAGE_TAG=v1.2.0" >> .env
# Pull and restartdocker compose pulldocker compose up -dModify docker-compose.yml
Section titled “Modify docker-compose.yml”Directly modify image tags:
services: backend: image: ghcr.io/leslieleung/glean-backend:v1.2.0 web: image: ghcr.io/leslieleung/glean-web:v1.2.0 admin: image: ghcr.io/leslieleung/glean-admin:v1.2.0Testing Pre-release Versions
Section titled “Testing Pre-release Versions”Pre-release versions (alpha/beta/rc) are for testing new features:
# Use pre-release versionIMAGE_TAG=v1.3.0-alpha.1 docker compose up -dVersion Rollback
Section titled “Version Rollback”If issues occur after updating, you can rollback to the previous version:
# Stop servicesdocker compose down
# Set old versionexport IMAGE_TAG=v1.1.0
# Start old versiondocker compose up -dDatabase Migrations
If the new version ran database migrations, rollback may require manual database handling. Recommend backing up the database before updating.
Pre-Update Checklist
Section titled “Pre-Update Checklist”-
Backup Data
Terminal window docker exec glean-postgres pg_dump -U glean glean | gzip > backup_before_update.sql.gz -
Review Changelog
- Visit GitHub Releases
- Read version update notes
-
Check Breaking Changes
- Note Breaking Changes markers
- Check configuration variable changes
-
Prepare Rollback Plan
- Record current version
- Ensure valid backup exists
Verify Update
Section titled “Verify Update”Check Service Status
Section titled “Check Service Status”# All services should be healthydocker compose ps
# Expected output example# NAME STATUS# glean-backend Up (healthy)# glean-worker Up# glean-web Up# glean-admin Up# glean-postgres Up (healthy)# glean-redis Up (healthy)Check API Health
Section titled “Check API Health”curl http://localhost/api/healthCheck Logs
Section titled “Check Logs”# Check for errorsdocker compose logs --tail=100 backend | grep -i error
# Check workerdocker compose logs --tail=100 worker | grep -i errorAutomatic Updates
Section titled “Automatic Updates”Using Watchtower (Optional)
Section titled “Using Watchtower (Optional)”Watchtower can automatically update Docker containers:
docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ --cleanup \ --interval 86400 \ glean-backend glean-web glean-admin glean-workerUpdate Time Window
Section titled “Update Time Window”Recommended update times:
- Low user activity periods
- Sufficient time to handle potential issues
- Personnel available to respond to anomalies
Next Steps
Section titled “Next Steps”- Troubleshooting - Resolve common issues
- Backup & Restore - Data backup strategies