Skip to content

Instantly share code, notes, and snippets.

@tchap
Last active December 19, 2015 11:29
Show Gist options
  • Save tchap/5948118 to your computer and use it in GitHub Desktop.
Save tchap/5948118 to your computer and use it in GitHub Desktop.
Run Review Board inside of a Docker container.
# Run Review Board in a Docker container.
FROM ubuntu:latest
MAINTAINER Ondrej Kupka "[email protected]"
# Get all packages we need
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
# Install Python
RUN apt-get install -y python-setuptools python-dev
# Install Memcached
RUN apt-get install -y memcached
RUN easy_install python-memcached
# Install PostgreSQL
RUN apt-get install -y postgresql postgresql-server-dev-9.1
RUN easy_install psycopg2
# Install lighttpd
RUN apt-get install -y lighttpd
# Install Git
RUN apt-get install -y git-core
# Other requirements
RUN apt-get install -y patch
# Install Review Board itself
RUN easy_install ReviewBoard
# Start PostgreSQL
RUN service postgresql start
RUN su postgres -c "psql -c \"CREATE ROLE root SUPERUSER PASSWORD 'toor'\""
# Set up Review Board
RUN rb-site install --noinput --domain-name=localhost --site-root=/ --static-url=/static --media-url=/media --db-type=postgresql --db-name=reviewboard --db-host=127.0.0.1 --db-user=rb --db-password=rb --cache-type=memcached --cache-info=127.0.0.1 --web-server-type=lighttpd --web-server-port=8080 --admin-user=admin --admin-password=admin [email protected] /var/www/reviewboard
# Stop PostgreSQL
RUN service postgresql stop
# Set up lighttpd
RUN cp SITE_ROOT/conf/lighttpd.conf /etc/lighttpd/conf-available/reviewboard
RUN ln -s /etc/lighttpd/conf-available/reviewboard /etc/lighttpd/conf-enabled/reviewboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment