stadtratmonitor/README.md
2016-03-05 21:24:04 +01:00

1.6 KiB

Stadtratmonitor

Build Status Coverage Status Code Climate

Setup

There are two ways to run this app: using a local development setup, or using docker.

Local machine setup

  1. Install Ruby, Bundler, Elasticsearch
  2. Start Elasticsearch: elasticsearch
  3. Setup Rails app: bundle && bundle exec rake db:setup
  4. See "Importing data" below
  5. Start Rails server: bundle exec rails s
  6. Visit http://localhost:3000

Using docker

  1. Install docker and docker-compose: https://docs.docker.com/compose/install/
  2. Start the app: docker-compose up
  3. Initialize the database: docker-compose run web rake db:setup
  4. See "Importing data" below
  5. Get the address of the docker host: docker-machine ip default
  6. Point your browser to: 'http://<IP of docker host>:3000'

Importing data and building the index

  1. Currently an API key for morph is required: cp config/morph.yml.example config/morph.yml Edit the morph.yml file and insert the Morph API key
  2. Import the data from our scraper: docker-compose run web rake import_papers
  3. Build the elasticsearch index: docker-compose run web rake index:rebuild