abhshkdz / HackFlowy

:notebook: Workflowy clone, built using Backbone.js & Socket.io
806 stars 150 forks source link

Heroku integration #17

Closed desyncr closed 9 years ago

desyncr commented 9 years ago

Initial changes to be able to easily deploy HackFlowy to heroku (for quick testing, etc).

The steps to deploy to heroku are as follow:

heroku create --stack cedar
heroku addons:add heroku-postgresql:dev
heroku config:set NODE_ENV=production
git push heroku heroku-integration:master

You'll need heroku toolbelt installed. See https://devcenter.heroku.com/articles/heroku-command

There is a live heroku instance running at http://agile-plains-2755.herokuapp.com/

Hope somebody could take a look at this PR and report any issue/question etc.

captn3m0 commented 9 years ago

A better way (instead of rebasing against master) is to just use git push heroku heroku-integration:master. You might also wanna take a look at https://devcenter.heroku.com/articles/heroku-button for an even better one-click solution.

captn3m0 commented 9 years ago

Another issue I'm seeing is use of port 80. Heroku passes you the $PORT variable in the environment, which should be used instead.

Also, the heroku create command automatically added the remote for me (heroku-toolbelt/3.9.7 (x86_64-linux) ruby/2.0.0), making the second command redundant.

captn3m0 commented 9 years ago

I also get a npm WARN package.json hackflowy@0.0.1 No repository field.. Should be easy to fix.

desyncr commented 9 years ago

A better way (instead of rebasing against master) is to just use git push heroku heroku-integration:master. Also, the heroku create command automatically added the remote for me (heroku-toolbelt/3.9.7 (x86_64-linux) ruby/2.0.0), making the second command redundant.

Awesome I'm gonna update the PR description and the README.md

You might also wanna take a look at https://devcenter.heroku.com/articles/heroku-button for an even better one-click solution.

I will do so, thanks.

Another issue I'm seeing is use of port 80. Heroku passes you the $PORT variable in the environment, which should be used instead.

Something I forgot to mention is that the process.env.PORT overrides the port configuration. See here. I'll update the PR description with this info.

I also get a npm WARN package.json hackflowy@0.0.1 No repository field.. Should be easy to fix.

Yeah that's easy as it is just a package.json's field.

Thanks for the feedback.

captn3m0 commented 9 years ago

You can test heroku button integration by using the "branch" field to test deploy the heroku-integration branch.

desyncr commented 9 years ago

Heroku integration works as it's now. You can test it by following this link and clicking the deploy button, or by following this direct link.

If somebody could double check my writting in the README.md and maybe enhance it a bit would be awesome.

If there are not objections I'm going to merge this into master tomorrow.

abhshkdz commented 9 years ago

Great work @desyncr! Heroku one-click deploy works perfectly for me. :smile:

We seem to be getting closer to a successful merge. @captn3m0 comments?

captn3m0 commented 9 years ago

Great work :+1: