Consulting city-dwellers about legislation near them.
Created for the city of Mesa, AZ. Please feel free to post in the "Issues" section with any questions or comments.
Municipal is a Ruby on Rails application using PostgreSQL and PostGIS.
-
Begin by installing Ruby and PostgreSQL for your system.
You will also need a javascript runtime such as Node for use by
bundle
, and PostGIS for database geo features. On Mac, these may already be installed with the base system and Postgres.app. On Ubuntu Linux, they can be installed with:apt-get install nodejs postgresql-9.3-postgis-2.1
-
Create a PostgreSQL user with super-user privileges (
createdb --superuser
) and a name matching that of your user account (whoami
). -
Clone MuniciPal to your local server:
git clone https://github.com/codeforamerica/MuniciPal.git cd MuniciPal
-
Install Ruby dependencies:
bundle install
-
Create the database:
bundle exec rake db:create bundle exec rake app:deploy
-
Edit your deployment-specific configuration. For dev/test environments, copy the file
.env.sample
to.env
and edit the configuration settings in it. For Heroku production environments, the configuration can be set withheroku config
or via the app dashboard (tip: add theheroku-config
plugin and you can runheroku config:push -i
to push all your .env variables, interactively; see heroku's configuration documentation for details). If you are deploying via the 'Deploy to Heroku' button, you'll be able to set the configuration during the deployment process through a web form.
rails server
Now you can access your application at http://0.0.0.0:3000
The map component of this application is based around Mesa's Council Districts. It searches through legislative text for Districts and then associates them with those districts so that they can be pulled up through the map and through address search.
More information about where we get the district boundaries can be found on the wiki.
Deploy automatically:
Or deploy manually:
heroku create
heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
heroku addons:add heroku-postgresql:hobby-dev
heroku pg:info
git push heroku master
heroku run bundle exec rake app:deploy
Running rake legistar_all:refresh
(locally), or heroku run rake legistar_all:refresh
on heroku will fetch the recent agenda items. You may also want to learn how to schedule Legistar updates on Heroku.
Please see the wiki.
Current tests may be stale.
Copyright (c) 2014 Code for America. BSD License. Based on sa-zone, created by Amy Mok, Maya Benari, and David Leonard. Significantly modified by Peter Welte, Tom Buckley, Andrew Douglas, and Wendy Fong.