Skip to content

denverfoundation/storybase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floodlight

What is Floodlight?

This is the code base behind Floodlight, a powerful story-building website that enables community change makers to inspire action and advance their issues through more substantive, engaging and persuasive data-driven storytelling.

For more information, see http://www.floodlightproject.org/

Development Setup

Setting up the website can be broken into five parts:

  • Install Server Dependencies
  • Codebase - Django developement server
  • Database - PostgreSQL with PostGIS
  • Search Platform - Solr with GIS modification
  • Put it all together - migrate and run

Dependencies

GDAL and GEOS are required for GeoDjango:

$ sudo apt-get install gdal-bin libgeos-dev

PostGIS is required for the spatial database requirements:

$ sudo apt-get install postgis

Codebase

Start by cloning the project:

$ git clone https://github.com/denverfoundation/storybase.git
$ cd storybase

Copy settings from settings/default.py to settings/dev.py:

$ cp settings/default.py settings/dev.py

In a virtual environment, install the dependencies with pip:

$ pip install -r requirements.txt

Database

The database name, user, and password are set in settings/dev.py. They are set to a default floodlight.

After creating a database, you will need to add the postgis extension:

CREATE EXTENSION postgis;

OR:

# psql floodlight -c "CREATE EXTENSION postgis";

Search Platform

Clone the modified Solr:

$ git clone https://github.com/denverfoundation/storybase_solr.git

Putting it all together

Start by spinning up the Solr system:

$ cd storybase_solr
$ java -Dsolr.solr.home=multicore -jar start.jar

Sync and Migrate the database from the codebase directory:

$ python manage.py syncdb
$ python manage.py migrate

Finally, run the app:

$ python manage.py runserver

Rebuild/Refresh Solr Indexes

To rebuild the indexes (destructive), run:

$ python manage.py rebuild_index

To refresh the indexes, run:

$ python manage.py update_index

License

This software is licensed under the MIT License

Authors

On the shoulders of giants

This project includes a number of excellent open-source libraries: