This is the Rails application of Crowdbreaks. For a more general intro to Crowdbreaks please follow this link.
You may want to run the crowdbreaks-streamer for full functionality, but the Rails application works fine on its own.
This setup was tested with docker version 20.10.0, and docker-compose version 1.27.4.
- Install docker/docker-compose
- Clone this repository and
cd
into project folder - Copy example secrets file
cp config/application.yml.example config/application.yml
- Run
docker-compose up
- 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
.
- Go to
localhost:3000
🌈
- First, install ruby e.g. through rbenv.
rbenv install 2.5.8
rbenv global 2.5.8
- Install Redis, e.g. with
brew install redis && brew services start redis
- Install Postgres, e.g. with
brew install postgresql && brew services start postgresql
- Install node and yarn, e.g. with
brew install node yarn
- Clone this repository and
cd
into project folder
git clone git@github.com:salathegroup/crowdbreaks.git && cd crowdbreaks
- Copy example secrets file
cp config/application.yml.example config/application.yml
- Install dependencies
gem install bundler -v 2.1.4
bundle install
yarn install
- Create, migrate, and seed the database
bundle exec rails db:create db:migrate db:seed
- 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
Run docker-compose up, and run tests via:
docker exec app bundle exec rspec
Currently js tests are not supported outside of docker. Everything else should still pass:
bundle exec rspec
This application is deployed with Heroku. You can read more about deployment on the wiki page Deployment on Heroku.
You can find more information to specific topics on the Crowdbreaks wiki.
In case of questions feel free to write to info@crowdbreaks.org.