mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Stadtratmonitor – Frontend
https://stadtratmonitor.leipzig.codefor.de
app | ||
bin | ||
config | ||
db | ||
lib | ||
log | ||
public | ||
spec | ||
test | ||
vendor/assets | ||
.ci.env | ||
.coveralls.yml | ||
.dockerignore | ||
.gitignore | ||
.project | ||
.rspec | ||
.ruby-version | ||
.travis.yml | ||
config.ru | ||
docker-compose.yml | ||
Dockerfile | ||
Gemfile | ||
Gemfile.lock | ||
Guardfile | ||
LICENSE | ||
Rakefile | ||
README.md |
Stadtratmonitor
Setup
There are two ways to run this app: using a local development setup, or using docker.
Local machine setup
- Install Ruby, Bundler, Elasticsearch
- Start Elasticsearch:
elasticsearch
- Setup Rails app:
bundle && bundle exec rake db:setup
- See "Importing data" below
- Start Rails server:
bundle exec rails s
- Visit http://localhost:3000
Using docker
- Install docker and docker-compose: https://docs.docker.com/compose/install/
- Start the app:
docker-compose up
- Initialize the database:
docker-compose run web rake db:setup
- See "Importing data" below
- Get the address of the docker host:
docker-machine ip default
- Point your browser to: 'http://<IP of docker host>:3000'
Importing data and building the index
- 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 - Import the data from our scraper:
docker-compose run web rake import_papers
- Build the elasticsearch index:
docker-compose run web rake index:rebuild