denverfoundation / storybase

The code behind Floodlight
http://floodlightproject.org
MIT License
11 stars 7 forks source link

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:

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 <https://virtualenv.pypa.io/en/latest/>_, 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 <http://opensource.org/licenses/MIT>`_

Authors

On the shoulders of giants

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