Appearance
Upgrade Roadmap
Keep your BrowserStack Code Quality instance updated to access new security patches, language support, and performance improvements.
1. Prerequisites (Safety Gate)
Stop! Before touching your production instance, ensure you have valid backups. If an upgrade fails, your data is your only safety net.
- [ ] Database Backup: Follow the Database Backup Guide to export your PostgreSQL data.
- [ ] File Backup: (optional) Follow the File Backup Guide to secure gamma data folder.
Environment Health Check
Ensure your host has enough resources to pull the new images and run migrations:
bash
# Check available disk space (Ensure at least 20GB free)
df -h /home/${USER}/BrowserStackCodeQuality/
# Verify Docker is running and up to date
docker --version2. Standard Update (Version 1.9.26.0+)
Choose the method matching your current deployment.
Method A: Docker Compose (Recommended)
This is the cleanest way to upgrade. It ensures all linked services (App and DB) are updated together.
- Navigate to your installation directory.
- Update the
imageversion tag in yourdocker-compose.yml. - Run the following:
bash
# Stop services and pull new images
docker-compose down
docker-compose pull
# Restart services in detached mode
docker-compose up -dMethod B: Docker Run
If you are running a single container without Compose:
bash
# 1. Pull the target version
docker pull browserstack/code-quality:1.9.36.0
# 2. Stop and remove the current container (Data is safe in volumes)
docker stop BrowserStackCodeQuality
docker rm BrowserStackCodeQuality
# 3. Start the new container with your existing volumes
docker run -m 12GB -d -p 3000:3000 \
--name BrowserStackCodeQuality \
-e ACCEPT_EULA=Y \
-e gamma_ui_public_host=http://localhost:3000 \
-v /home/${USER}/BrowserStackCodeQuality/gamma_data:/opt/gamma_data \
-v /home/${USER}/BrowserStackCodeQuality/gamma_psql_data:/var/lib/postgresql \
-v /home/${USER}/BrowserStackCodeQuality/logs:/opt/gamma/logs \
browserstack/code-quality:1.9.36.03. Legacy Upgrade (Versions < 1.9.26.0)
WARNING
Database Architecture Change: Versions prior to 1.9.26.0 used an internal PostgreSQL. Modern versions require a separate database container. You must migrate your data manually.
Phase 1: Export Legacy Data
bash
# Export databases from the legacy all-in-one container
docker exec -it BrowserStackCodeQuality sh -c "pg_dump -U postgres corona -f /opt/gamma_data/backup/corona.sql && pg_dump -U postgres gamma -f /opt/gamma_data/backup/gamma.sql"Phase 2: Start New Database & Restore
We recommend using PostgreSQL 16.3-alpine. Once the new DB container is running, create the corona and gamma databases and import your .sql files.
Phase 3: Deploy New App Container
Link the new application container to your new database using the PGHOST, PGUSER, and PGPASSWORD environment variables.
4. Post-Update Verification
Run these "No-Noise" checks to confirm the system is healthy:
| Check | Command | Expected Result |
|---|---|---|
| Container Status | docker ps | Status: Up |
| Connectivity | curl -I http://localhost:3000 | HTTP/1.1 200 OK |
| Error Logs | docker logs BrowserStackCodeQuality --tail 20 | No "Fatal" migration errors |
Related Documentation
- Rollback Procedures – Emergency recovery steps
- Performance Optimization – Memory and JVM tuning
- System Requirements – Minimum hardware specs
