Skip to content

digitalepidemiologylab/crowdbreaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crowdbreaks logo

This is the Rails application of Crowdbreaks. For a more general intro to Crowdbreaks please follow this link.

Build Status

Install

You may want to run the crowdbreaks-streamer for full functionality, but the Rails application works fine on its own.

Development

With docker

This setup was tested with docker version 20.10.0, and docker-compose version 1.27.4.

  1. Install docker/docker-compose
  2. Clone this repository and cd into project folder
  3. Copy example secrets file cp config/application.yml.example config/application.yml
  4. Run docker-compose up
  5. Create, migrate, and seed the database
docker exec app bundle exec rails db:create db:migrate db:seed

This creates the database crowdbreaks_development and creates a new user admin@example.com with password password.

  1. Go to localhost:3000 🌈

Without docker

  1. First, install ruby e.g. through rbenv.
rbenv install 2.5.8
rbenv global 2.5.8
  1. Install Redis, e.g. with brew install redis && brew services start redis
  2. Install Postgres, e.g. with brew install postgresql && brew services start postgresql
  3. Install node and yarn, e.g. with brew install node yarn
  4. Clone this repository and cd into project folder
git clone git@github.com:salathegroup/crowdbreaks.git && cd crowdbreaks
  1. Copy example secrets file cp config/application.yml.example config/application.yml
  2. Install dependencies
gem install bundler -v 2.1.4
bundle install
yarn install
  1. Create, migrate, and seed the database
bundle exec rails db:create db:migrate db:seed
  1. Run servers
# Rails development server
bin/rails s
# Webpack development server (in a separate tab)
bin/server
# Background jobs (in a separate tab)
bundle exec sidekiq -q default -q mailers

Tests

With docker

Run docker-compose up, and run tests via:

docker exec app bundle exec rspec

Without docker

Currently js tests are not supported outside of docker. Everything else should still pass:

bundle exec rspec

Deployment

This application is deployed with Heroku. You can read more about deployment on the wiki page Deployment on Heroku.

Documentation

You can find more information to specific topics on the Crowdbreaks wiki.

Contact

In case of questions feel free to write to info@crowdbreaks.org.