Public | Automated Build

Last pushed: 9 months ago
Short Description
Pybossa container from following the manual install steps.
Full Description

PyBossa Docker container

Docker container for running PyBossa.

Docker-Compose Quick Start

Use my docker-compose file
to set up a quick and dirty PyBossa environment for evaluation or test purposes.

WARNING: All data will be lost when the container is removed.

Manual Quick Start

If you prefer to run things by hand, this should get you going. Modify the POSTGRES_URL variable accordingly.

  1. (One-time) Set up a PostgreSQL database according to the Pybossa install docs or follow the instructions in the Run PostgreSQL in Docker section.
  2. (One-time) Create the PyBossa tables in your database.

     docker run --rm -it \
       -e POSTGRES_URL="postgresql://pybossa:supersecretpassword@db/pybossa" \
       jvstein/pybossa \
       python cli.py db_create
    
  3. Start the Redis master.

     docker run -d --name redis-master redis:3.0-alpine
    
  4. Start Redis Sentinel.

     docker run -d --name redis-sentinel \
       --link redis-master \
       jvstein/redis-sentinel
    
  5. Start the PyBossa background worker.

     docker run -d --name pb-worker \
       --link redis-master \
       --link redis-sentinel \
       -e POSTGRES_URL="postgresql://pybossa:supersecretpassword@db/pybossa" \
       jvstein/pybossa \
       python app_context_rqworker.py scheduled_jobs super high medium low email maintenance
    
  6. Start the PyBossa frontend.

     docker run -d --name pybossa \
       --link redis-master \
       --link redis-sentinel \
       -e POSTGRES_URL="postgresql://pybossa:supersecretpassword@db/pybossa" \
       -p 8080:8080 \
       jvstein/pybossa
    

Run PostgreSQL in Docker

I don't recommend running your database in Docker unless you've fully considered
the consequences and know how to ensure your data is preserved. However, for
simple test purposes, this is adequate.

  1. Start PostgreSQL in a container. Change /tmp/postgres to a more permanent
    volume path if you need your data to persist across docker container
    instances.

     docker run -d --name pybossa-db \
         -e POSTGRES_USER=pybossa \
         -e POSTGRES_PASSWORD=supersecretpassword \
         -e PGDATA=/data/pgdata \
         -v /tmp/postgres:/data \
         postgres:9.6-alpine
    
  2. Add --link pybossa-db:db to the pb-worker and pybossa startup commands.

Docker Pull Command
Owner
jvstein
Source Repository