Live data from Hacker News

Static Sites on Heroku

anti-pattern.com

11–20 of 41 posts

Re: Static Sites on Heroku

#11

You know, static hosting works really great on Amazon S3, as long as you don't need a .htaccess file. On all of my jekyll sites I use S3 now and there's even a jekyll-s3 gem that makes pushing your site up to S3 painless. The nice thing about using S3 is you don't have to wait for Heroku instance start up if it's not a high traffic site.

We also host our static site on S3, it costs us $0.12/month. Here's how we do it: http://blog.shopforcloud.com/2012/04/how-to-host-your-site-o...

Re: Static Sites on Heroku

#12

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.

I just git push to the server from my laptop over SSH. No need for a git server (or Github, for that matter).

Re: Static Sites on Heroku

#15
Another option is Github pages. I host my blog there for free and have had posts featured on HN front page - served with nary a slowdown or github sending me a bill. It's awesome.

Github pages support a point-and-click interface (which is not likely what you want) but with a tiny amount of setup supports Jekyll https://help.github.com/articles/using-jekyll-with-pages / Octopress (what I use) http://octopress.org/docs/deploying/github/

Re: Static Sites on Heroku

#17

You know, static hosting works really great on Amazon S3, as long as you don't need a .htaccess file. On all of my jekyll sites I use S3 now and there's even a jekyll-s3 gem that makes pushing your site up to S3 painless. The nice thing about using S3 is you don't have to wait for Heroku instance start up if it's not a high traffic site.

Found some more info here: http://docs.amazonwebservices.com/AmazonS3/latest/dev/Websit...

Re: Static Sites on Heroku

#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 into a public folder which heroku uses to serve them.

Re: Static Sites on Heroku

#19

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.

This is what I do. Works great!

Re: Static Sites on Heroku

#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.

Post reply on HN