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

Heroku Plugin #254

Closed
balupton opened this issue Jul 2, 2012 · 9 comments
Closed

Heroku Plugin #254

balupton opened this issue Jul 2, 2012 · 9 comments

Comments

@balupton
Copy link
Member

balupton commented Jul 2, 2012

Now that the extensible cli is done. Having a heroku plugin would be awesome. Here's the requirements:

  1. Check if the heroku remote exists, if it doesn't then
    1. Check if gem exists, if it doesn't, tell them to install it, direct to a wiki page
    2. Check if heroku gem is installed, if it isn't, ask the user if they want it installed
    3. Check if they are logged in with the heroku gem, if not, get them to login
    4. Display a list of their heroku apps, ask if they want to use one or create a new one, if create a new one, what name should it use
    5. With the app they chose, add its git url as the heroku remote
  2. Deploy to the heroku remote

Alternatively, we can use the rest api instead, which would work like so:

  1. Check if the heroku remote exists, if it doesn't then
    1. Run heroku auth:token, and use the result. If it fails, ask for the user's heroku token
    2. Use the heroku token and rest api to fetch a list of apps
    3. List the apps to the user, ask them if they want to use one, or create a new one, if create a new one, what name should it have
    4. With the app they chose, fetch its heroku remote, and add it to the git repo
  2. Deploy to the heroku remote

We can also use the git api to setup a post hook to redeploy to heroku whenever master changes - link: http://developer.github.com/v3/repos/hooks/

Other steps:

  1. Will need to add a ssh key to heroku for docpad in order to do the git pushes to heroku
  2. Will need to create server.js, Procfile, package.json>main, and config.json
@balupton
Copy link
Member Author

DocPad v6.2.0 greatly simplified DocPad deployment to heroku. So I doubt this is of value anymore.

@MehdiK
Copy link

MehdiK commented Sep 11, 2013

I just started creating a heroku plugin because IMHO the current heroku story has a few issues:

  • It uses docpad server which, although good for development, uses a fair bit of memory on heroku. For my blog that's more memory than free heroku instance offers :p I am using Express.js and Procfile to host the docpad generated files on heroku.
  • It deploys the entire repository to heroku while all I really need is the out folder and few files on the root.
  • I don't want to push my out folder to my git/github repo. So that folder is ignored. The plugin uses a similar model to ghpages plugin; but it creates a folder on the fly, puts all the required files and folders in it, creates a git repo in it and force pushes it to heroku.

I like your requirement list too. So might add to it later.

What do you think?

@balupton
Copy link
Member Author

Up to you mate, if you believe it will be of value to you, then go for it.

Personally, the current setup works perfect for me.

Perhaps this is another +1 for a mailing list (ref #637) as if we had a mailing list you could email it for the communities thoughts.

@MehdiK
Copy link

MehdiK commented Sep 11, 2013

Sure. Thanks.

@stongo
Copy link

stongo commented Jan 6, 2014

+1 on this
I'm having issues on Heroku as well. The 512mb of ram is running out pretty fast. Not sure if there's a memory leak, but 512mb runs out after a day approximately and the site crashes

@stongo
Copy link

stongo commented Jan 7, 2014

Got docpad-plugin-raw working with Heroku
https://github.com/stongo/docpad-plugin-raw/tree/ncp

@stongo
Copy link

stongo commented Jan 7, 2014

After running my site on Heroku with this version of docpad-plugin-raw, heroku still logs the occasional out of memory entry, but it doesn't affect the site at all, and these warnings are FAR less frequent.
Generation time also went from 80 seconds to 10 seconds.
I was about to abandon Heroku to be honest, but now it seems extremely promising.
Also using docpad-plugin-st with cache turned off

@mikeumus
Copy link
Member

Ben has this from a couple years back:
https://github.com/docpad/docpad-plugin-heroku

@balupton
Copy link
Member Author

Moved to: docpad-archive/docpad-plugin-heroku#1

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

No branches or pull requests

4 participants