Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easy deploy to heroku button #86

Merged
merged 15 commits into from
Nov 3, 2014
Merged

Conversation

techieshark
Copy link
Contributor

This fixes #42

Important note:

  • This switches to Ruby 2.1.2 (you may need to update your local environment to test this, see the commit for docs: 6b01dd2)

It also does these things:

  • Switches the debugger to since the, uh, debugger gem doesn't work anymore.
  • Adds an app.json file to explain to Heroku how to build the package
  • Adds the deploy button to the README (twice! once in the deployment instructions and once at the top since it is so easy we might as well highlight that)
  • Adds an app:deploy rake task which calls the tasks to migrate the database and load districts + legistar; the app.json uses this one global task and I update the README to reflect this new-found simplicity.
  • Adds a dark-text logo that works on Heroku's light background

techieshark and others added 15 commits October 31, 2014 12:13
- this is used by Mesa team to post to a Slack channel,
  but we don’t want every deployment in the world to post in there.

- also, this add on needs an extra parameter (the url of the slack web hook)
  and since it wasn’t included in the config, the deploy was failing.
- adds new rake task app:deploy
  which in turn calls `db:migrate`, `council_districts:load`,
  and `legistar_all:refresh`.
- uses task in app.json for auto deploy and in README
- Note that currently the website and repo url are
  the same but that may change eventually (if we create a github pages
  landing page for instance).
- stack must be cedar for this to work (see #42).
- region is almost always going to be in the US, at least for now.
- 2.1.2 is recommended on Heroku:
  https://devcenter.heroku.com/changelog-items/468

- `debugger` gem does not build on 2.1.2; switching to `byebug`
   `bye bug` is the recommended debugger for current Ruby + Rails (see cldwalker/debugger#125 (comment) and rails/rails#14533)

- The following commands may help in switching your local version (assuming you use rbenv):

	rbenv install 2.1.2
	rbenv local 2.1.2
	gem install bundler
	bundle
Heroku support says: “I’m afraid our interface or the app.json format doesn't currently allow this. Our API does, but this probably wouldn't fit your use case.”
After testing, this didn’t seem to have any effect.
tbuckl added a commit that referenced this pull request Nov 3, 2014
@tbuckl tbuckl merged commit 57c88c9 into master Nov 3, 2014
@techieshark techieshark deleted the feature/easy-deploy-to-heroku-button branch November 3, 2014 15:06
@tbuckl
Copy link
Member

tbuckl commented Nov 3, 2014

question: how does the deploy to heroku button work? can we configure it to have different database (paid and not paid)? thinking about using github deploy for testing (free) and then production (paid?).

@techieshark
Copy link
Contributor Author

@buckleytom AFAIK there isn't much possibility of that kind of configuration. I think that once we completely eliminate the PostGIS requirement we can make the default heroku-postgresql in the addons in app.json be the free version instead of standard-0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Click to Deploy to Heroku Button
2 participants