Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

jvstein/docker-pybossa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Docker container for running PyBossa

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published