Skip to content

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.

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 --version

2. Standard Update (Version 1.9.26.0+)

Choose the method matching your current deployment.

This is the cleanest way to upgrade. It ensures all linked services (App and DB) are updated together.

  1. Navigate to your installation directory.
  2. Update the image version tag in your docker-compose.yml.
  3. Run the following:
bash
# Stop services and pull new images
docker-compose down
docker-compose pull

# Restart services in detached mode
docker-compose up -d

Method 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.0

3. 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:

CheckCommandExpected Result
Container Statusdocker psStatus: Up
Connectivitycurl -I http://localhost:3000HTTP/1.1 200 OK
Error Logsdocker logs BrowserStackCodeQuality --tail 20No "Fatal" migration errors