Code Monkey home page Code Monkey logo

docker-pybossa's Introduction

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-pybossa's People

Contributors

jvstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-pybossa's Issues

Create Docker Compose definition

Having a docker-compose.yml file as part of the project would make it even easier to spin up Pybossa and the supporting database/redis server. I would be happy to fork and submit a PR if you have interest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.