Deploying Review Board
Introduction
Review Board is a powerful, open-source web-based code review tool that helps development teams improve code quality through collaborative reviews. Used by organizations from startups to Fortune 500 companies, Review Board provides a comprehensive platform for pre-commit and post-commit code review workflows.
Key highlights of Review Board:
- Flexible Reviews: Support for pre-commit and post-commit review workflows
- Multi-SCM Support: Integration with Git, Mercurial, SVN, Perforce, CVS, and more
- Diff Viewer: Syntax-highlighted side-by-side diff comparison
- Comment Threading: Inline comments with discussion threads
- Review Requests: Structured review request workflow with approvals
- Screenshot Reviews: Review images and mockups alongside code
- Extensions: Plugin architecture for custom functionality
- REST API: Comprehensive API for automation and CI integration
- Search: Full-text search across reviews and code
- Dashboard: Personalized dashboard showing pending reviews
- Open Source: MIT-licensed with active development
This guide walks through deploying Review Board on Klutch.sh using Docker and connecting it to your repositories.
Why Deploy Review Board on Klutch.sh
Deploying Review Board on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys Review Board without complex setup.
Persistent Storage: Attach persistent volumes for review data and uploaded files that survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL for secure code review access.
Environment Variable Management: Securely store database credentials through Klutch.sh.
Custom Domains: Assign a custom domain for a professional code review platform.
Prerequisites
Before deploying Review Board on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Review Board configuration
- An external database (PostgreSQL recommended)
- Access to your source code repositories
- Basic familiarity with Docker
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for Review Board deployment.
Repository Structure
reviewboard-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM beanbag/reviewboard:latest
# Set environment variablesENV REVIEWBOARD_DB_TYPE=postgresqlENV REVIEWBOARD_DB_HOST=${DB_HOST}ENV REVIEWBOARD_DB_PORT=${DB_PORT:-5432}ENV REVIEWBOARD_DB_NAME=${DB_NAME:-reviewboard}ENV REVIEWBOARD_DB_USER=${DB_USER}ENV REVIEWBOARD_DB_PASSWORD=${DB_PASSWORD}ENV REVIEWBOARD_SITE_ROOT=/ENV REVIEWBOARD_SITE_DOMAIN=${SITE_DOMAIN}
# Create necessary directoriesRUN mkdir -p /var/www/reviewboard/htdocs/media/uploaded \ && mkdir -p /var/www/reviewboard/data
# Expose the web interface portEXPOSE 8080
# The base image includes the default entrypointEnvironment Variables Reference
| Variable | Required | Description |
|---|---|---|
DB_HOST | Yes | PostgreSQL host address |
DB_PORT | No | Database port (default: 5432) |
DB_NAME | No | Database name (default: reviewboard) |
DB_USER | Yes | Database username |
DB_PASSWORD | Yes | Database password |
SITE_DOMAIN | Yes | Public domain (e.g., your-app.klutch.sh) |
Deploying Review Board on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8080
Push Your Repository to GitHub
Commit and push your Dockerfile to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “reviewboard” or “code-review”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Review Board Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
DB_HOST | Your PostgreSQL host |
DB_USER | Your database user |
DB_PASSWORD | Your database password |
SITE_DOMAIN | your-app.klutch.sh |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/www/reviewboard/htdocs/media/uploaded | 10 GB | Uploaded files and screenshots |
/var/www/reviewboard/data | 5 GB | Site data and cache |
Deploy Your Application
Click Deploy to start the build process.
Access Review Board
Once deployment completes, access Review Board at your app URL.
Initial Configuration
First-Time Setup
- Access the Review Board admin interface at
/admin/ - Create your administrator account
- Configure site settings
Connecting Repositories
- Navigate to Admin > Repositories
- Click Add Repository
- Select the repository type (Git, SVN, etc.)
- Configure connection details and credentials
- Test the repository connection
Configuring Review Groups
- Go to Admin > Review Groups
- Create groups for different teams or projects
- Add users to appropriate groups
- Groups can be used in review requests
Setting Up Authentication
- Navigate to Admin > Authentication
- Configure authentication backends (LDAP, Active Directory, etc.)
- Set up user registration options
Code Review Workflow
Posting a Review Request
- Use the RBTools command-line tool or web interface
- Upload diffs from your local repository
- Add reviewers and descriptions
- Submit the review request
Reviewing Code
- Open the review request
- View diffs with syntax highlighting
- Add inline comments on specific lines
- Publish your review with Ship It or Request Changes
Closing Reviews
- Address reviewer feedback
- Update the review request with new diffs
- Receive approval (Ship It)
- Close the review as submitted
Additional Resources
Conclusion
Deploying Review Board on Klutch.sh gives you a powerful, self-hosted code review platform with automatic builds, persistent storage, and secure HTTPS access. With its flexible workflow support and multi-SCM integration, Review Board helps development teams maintain code quality through effective peer review.