I've been looking around at various options to integrate a blog into my Rails app hosted on Heroku. Nesta looks promising, but since it manages blog posts directly in Git I'd have a couple of minutes downtime each time I published a post (due to Heroku's slug compilation). It appears that I was mistaken on this point.
Are there any options that meet all of the following requirements?
- Is compatible with Heroku's 开发者_StackOverflow中文版read-only file system.
- Can be integrated into an existing Rails 3 app.
- Has a web interface so I don't end up recompiling every time I publish a post.
I use Jekyll, Rack and Heroku to power my blog. It has worked quite well for me.
http://nerian.es/2011/07/13/new-website.html
You can take a look at the code here:
https://github.com/Nerian/nerian.github.com
I will say that there is no downtime when you update a slug in Heroku. The app is not restarted until the whole process is completed. And then is just seconds before being ready.
You can try that. Push a new release to your heroku slug and open many browser tabs to your blog. You will notice that the down time is nearly 0.
Another option is to use a service oriented design to this problem. Instead of integrating a blog engine inside your current rails app build an isolated blog app. So that your architecture looks like this:
- www.yourapp.com -> Served by your current Rails app.
- blog.yourapp.com -> Served by Jekyll or Sinatra in a different Heroku deployment.
That way when you update your blog your whole site can keep running. You won't lose a single second of vital services' activity.
Edit:
Instead of subdomains, if you want to use an endpoint inside your current domain you can match /blog to a rack application serving your blog.
http://edgeguides.rubyonrails.org/routing.html#routing-to-rack-applications
Try Refinery CMS, which runs as an engine inside your Rails app:
http://refinerycms.com/
精彩评论