Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Sean Knox edited this page Aug 4, 2013 · 13 revisions

Welcome to the code-for-america wiki!

Ubuntu Installation

The following works for Ubuntu 12.04.2, and should work on later versions

Install dependencies

  • To install all the packages needed for gems and other components, you can use this snippet:
sudo apt-get install build-essential ruby-dev libxslt-dev libxml2-dev libqt4-dev \
libpq-dev imagemagick libmagickwand-dev libsqlite3-dev nodejs openjdk-7-jre

Or if you want to satisfy specific dependencies, follow bellow:

  • Basic Ubuntu development tools: sudo apt-get install build-essential ruby-dev

  • nokogiri: sudo apt-get install libxslt-dev libxml2-dev

  • capybara sudo apt-get install libqt4-dev (For other versions of Ubuntu, this link from Thoughtbot has good information)

  • pg sudo apt-get install libpq-dev

  • rmagick sudo apt-get install imagemagick libmagickwand-dev

  • sqlite sudo apt-get install libsqlite3-dev

  • solr sudo apt-get install nodejs openjdk-7-jre

Create a postgres user

sudo -u postgres createuser --superuser $USER

Proceed with install

Now you can run bundle install and the rest of the install directions here: https://github.com/codeforamerica/brigade

Deploying the Application

In addition to the typical push to heroku and db setup. The following must be done:

  1. Run the rake task, cache_civic_commons_application_data. This task retrieves application data from civic commons.
  2. Create a remote heroku instance, heroku create. Then deploy to the heroku instance, git push heroku master.
  3. Create an admin user via the sign up page. Then toggle that user's admin flag manually via the heroku console.
  4. Setup the heroku add-on Heroku Scheduler: For running the rake task, cache_civic_commons_application_data. The frequency of running it is based on how often you may think data on civic commons is updated.
  5. Setup the heroku add-on Sendgrid: For allowing the system to send out emails
  6. Setup the heroku add-on Websolr: For enabling full text search on a variety of forms.
  7. Edit the facebook_app_id in config/social_networks.yml under production with your facebook application id.
  8. You can change the twitter account that is mentioned by default by going to app/views/deployed_applications/_social_network_modal.html.erb and editing the data-via attribute of the twitter link.

You must also be sure that the S3_SECRET environment variable is set as well.

Administering the Application

You cannot add a deployed application in the admin panel. The 'Add New' button is on the deployed application but it will not work because a deployed application needs to have the context of what application its deploying.