Skip to content

Deploy an instance of CityVoice to Heroku without ever leaving the comfort of your web browser

Notifications You must be signed in to change notification settings

isabella232/cityvoice-survey-builder

 
 

Repository files navigation

CityVoice Survey Builder

Running Locally

  • Clone the repo
  • Install Ruby 2.2.2 if not already installed (with rvm, rvm install 2.2.2)
  • Install dependencies with bundle install
  • Set dummy environment variables:
  • HEROKU_OAUTH_ID
  • HEROKU_OAUTH_SECRET
  • Install redis (brew install redis on OSX using homebrew)
  • Set REDISTOGO_URL to redis://localhost:6379 (or whatever your local connection is)
  • Run the app with bundle exec rackup and open your browser to http://localhost:9292

Testing

Test the builder with RSpec:

rspec

Deployment

Non-CFA users shouldn't need to deploy this, but for documentation purposes, here goes!

First, go to your account page on Heroku and under 'API Clients' click the 'Register API Client' button.

There, set the Name (whatever you want) and the OAuth Callback URL (this will be /callback on your deployment, for example: https://my-cityvoice-builder-instance.herokuapp.com/callback )

Once you've done that, note the 'ID' and 'SECRET' it gives you.

Now, clone this repo and cd into the folder. From there, create a Heroku app with your own name and the multi buildpack:

$ heroku create --buildpack https://github.com/ddollar/heroku-buildpack-multi.git my-cityvoice-builder-name

Now, configure your Builder app with the ID and SECRET from above:

$ heroku config:set HEROKU_OAUTH_ID=lolmyoauthid
$ heroku config:set HEROKU_OAUTH_SECRET=lolmysecret

Now push!

$ git push heroku master

Lastly, provision Heroku's RedisToGo add-on:

$ heroku addons:add redistogo:small

(Details and pricing [$39/mo for the small add-on shown above] can be found at: https://addons.heroku.com/RedisToGo )

Copyright Code for America Labs 2014, MIT License

About

Deploy an instance of CityVoice to Heroku without ever leaving the comfort of your web browser

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 51.5%
  • HTML 38.3%
  • JavaScript 9.9%
  • CSS 0.3%