Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM beanbag/reviewboard:latest
# Set environment variables
ENV REVIEWBOARD_DB_TYPE=postgresql
ENV 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 directories
RUN mkdir -p /var/www/reviewboard/htdocs/media/uploaded \
&& mkdir -p /var/www/reviewboard/data
# Expose the web interface port
EXPOSE 8080
# The base image includes the default entrypoint

Environment Variables Reference

VariableRequiredDescription
DB_HOSTYesPostgreSQL host address
DB_PORTNoDatabase port (default: 5432)
DB_NAMENoDatabase name (default: reviewboard)
DB_USERYesDatabase username
DB_PASSWORDYesDatabase password
SITE_DOMAINYesPublic domain (e.g., your-app.klutch.sh)

Deploying Review Board on Klutch.sh

    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:

    • Select HTTP as the traffic type
    • Set the internal port to 8080

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    DB_HOSTYour PostgreSQL host
    DB_USERYour database user
    DB_PASSWORDYour database password
    SITE_DOMAINyour-app.klutch.sh

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /var/www/reviewboard/htdocs/media/uploaded10 GBUploaded files and screenshots
    /var/www/reviewboard/data5 GBSite 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

  1. Access the Review Board admin interface at /admin/
  2. Create your administrator account
  3. Configure site settings

Connecting Repositories

  1. Navigate to Admin > Repositories
  2. Click Add Repository
  3. Select the repository type (Git, SVN, etc.)
  4. Configure connection details and credentials
  5. Test the repository connection

Configuring Review Groups

  1. Go to Admin > Review Groups
  2. Create groups for different teams or projects
  3. Add users to appropriate groups
  4. Groups can be used in review requests

Setting Up Authentication

  1. Navigate to Admin > Authentication
  2. Configure authentication backends (LDAP, Active Directory, etc.)
  3. Set up user registration options

Code Review Workflow

Posting a Review Request

  1. Use the RBTools command-line tool or web interface
  2. Upload diffs from your local repository
  3. Add reviewers and descriptions
  4. Submit the review request

Reviewing Code

  1. Open the review request
  2. View diffs with syntax highlighting
  3. Add inline comments on specific lines
  4. Publish your review with Ship It or Request Changes

Closing Reviews

  1. Address reviewer feedback
  2. Update the review request with new diffs
  3. Receive approval (Ship It)
  4. 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.