Live data from Hacker News

Static Sites on Heroku

anti-pattern.com

21–30 of 41 posts

Re: Static Sites on Heroku

#22
post #20

Two weeks ago I was looking for this. This is the easiest way I found to do it: heroku create myproject --stack cedar --buildpack https://github.com/pearkes/heroku-buildpack-static

Ha! I never thought anyone would use that. It's basically a simple fork of their PHP buildpack that stops caring if it's PHP and just serves off of Apache. Perhaps I should clean it up. I was also experimenting with a Pelican buildpack (a python Jekyll): https://github.com/pearkes/heroku-buildpack-pelican You deploy you markdown files and it generates your html in the deploy process.

I tried a few other buildpacks like the nginx ones, in the end this was the only one that didn't force me to configure or adapt anything, just worked, so thanks a lot! :)

Re: Static Sites on Heroku

#23
post #18

There's an even easier way to do static sites on heroku and have them compiled for you - use stasis ( http://stasis.me ) - I've built a framework on top of stasis and have been using it for months, as part of very large production sites, and it's been extremely stable and super easy to use. All you need to do to get them working on heroku is include a super basic config.ru file, and you're all set. The files compile…

What's the difference in using nanoc to do that?

Re: Static Sites on Heroku

#24
post #20

Earlier quoted context omitted.

Ha! I never thought anyone would use that. It's basically a simple fork of their PHP buildpack that stops caring if it's PHP and just serves off of Apache. Perhaps I should clean it up. I was also experimenting with a Pelican buildpack (a python Jekyll): https://github.com/pearkes/heroku-buildpack-pelican You deploy you markdown files and it generates your html in the deploy process.

I tried a few other buildpacks like the nginx ones, in the end this was the only one that didn't force me to configure or adapt anything, just worked, so thanks a lot! :)

No worries! I fixed it all up so it should be much more concise then it was. Still no configuration!

Re: Static Sites on Heroku

#25
I'm required by bootstrapper law to mention a project I'm working to get out of beta now:

http://spintoapp.com

Spinto is Git-based, like Heroku, and uses Jekyll with pre-processors for Sass/Scss (and Compass, Bourbon), Less & CoffeeScript. I agree with Brandon that FTP is hopelessly out of date and frustrating. Even more than that, I think there is madness in the idea that you need a database backend for your website to let somebody else change a comma, or an image (sometimes you need full-blown-CMS, but not always).

I'm trying to make a static websites easier for us to create, deploy, and collaborate on. Feedback _always_ appreciated.

Re: Static Sites on Heroku

#26

Heroku for a static site? Sounds like overkill. On my VPS I just do this: 1. Have public git repo, clone on server 2. Run nginx pointing to htdocs folder in git repo 3. When I want to deploy, ssh in and git pull Works just fine. Sure, it's a public site on GitHub, but I could just as easily run a git server.

can you explain more about the nginx thing? Since it's a GitHub repo, why you need a web server?

Re: Static Sites on Heroku

#27
post #26

Heroku for a static site? Sounds like overkill. On my VPS I just do this: 1. Have public git repo, clone on server 2. Run nginx pointing to htdocs folder in git repo 3. When I want to deploy, ssh in and git pull Works just fine. Sure, it's a public site on GitHub, but I could just as easily run a git server.

can you explain more about the nginx thing? Since it's a GitHub repo, why you need a web server?

Oh, I guess I could use GitHub hosting, but I wanted to host it on my own server. (I actually have a good reason to - I needed to access a WebSocket server on the same origin)

Re: Static Sites on Heroku

#28
Disclaimer: I'm a founder of Site44.

Like some of the commenters here, I looked around for simple static website hosting when I was trying to find a new home for my blog. I considered Heroku, GitHub Pages, and S3. Heroku didn't seem particularly optimized for static hosting (e.g., dyno spin-up time), and GitHub Pages lacked some flexibility (like custom mime types for my extension-less URLs). S3 doesn't handle things like sending gzipped content to only browsers that support it. Ultimately, my cofounder and I decided to build our own solution based on Dropbox: http://www.site44.com.

Site44 is in a private beta now, but we're hoping to move to a public beta very soon. I'd love to get some feedback from HN. The basic idea is that when you create a site (.site44.com or a custom domain), we create a folder for you in Dropbox, and then you publish by just modifying the contents of that folder.

Re: Static Sites on Heroku

#29
Isn't Heroku a mediocre option for a static site unless you're paying? If the site isn't accessed for a while they spin down your EC2 instance, and it takes a few seconds to get it back online.

Re: Static Sites on Heroku

#30

Isn't Heroku a mediocre option for a static site unless you're paying? If the site isn't accessed for a while they spin down your EC2 instance, and it takes a few seconds to get it back online.

My thought exactly. The 5-10 second lag involved in waking up a Heroku instance is a total drag for low-volume sites.
Post reply on HN