Include second independent repo in heroku app?

I have two repos: Web app (nodejs, but could be Rails, etc.) and Web site (static content html/css/js).

Heroku hosts the Web app, runs at e.g. www.example.com. Lots of dynamic content there e.g. example.com/ etc. (similar to twitter.com/).

The static content site also has to be at the base URL at specific URLs www.example.com/about /tour etc.

How can I have a single URL base www.example.com but still have the source come from both the Web site and the Web app?

I know I can have the Web app choose which URLs go where using router, but how do I actually get the Web app to get the static content? Options:

  • Proxy: host the Web site elsewhere (e.g. github pages) and just proxy. Very inefficient, ties up resources.
  • Single repo: messy, requires redeploys for each static page change. Ugh.
  • Web app as git client: Web site on github, checks, say, every 15 mins for github update using git client. Very messy, wastes lots of resource, and there is no persistent filesystem on heroku. Could waste CPU, memory, bandwidth downloading to ./tmp and it disappears by next request.
  • Database: huge waste. All my files are static assets.

Any good ideas??

There are many ways you can manage semi-static content in Rails, check out this question: How to do static content in Rails?

Here's a question with resources for node.js: Static Content & NodeJS