title: Deploying multiple instances of a Rails app - same code, multiple
body: <p>Firstly, Happy New Year everyone.</p>
  
  <p>I'm new to Rails, so please tolerate any incorrect use of terminology...</p>
  
  <p>I have developed a simple Rails application, backed by a MySQL database.</p>
  
  <p>I would now like to deploy this application to multiple, independent groups of users (i.e. it is a club application, and I would like to deploy it to a number of completely independent clubs).</p>
  
  <p>I would like to use the same Rails Application code as much as possible, and just have a separate instance of the database for each club.</p>
  
  <p>As each instance will be running on the same server (until server load proves to be an issue) I assume I can use a different port for each Rails server to steer users to the correct group?</p>
  
  <p>I'd read that there are test and production modes, is it possible to have multiple [additional] instances of production modes, e.g. club1, club2, all sharing the same code, with unique databases?</p>
  
  <p>My questions are how to support multiple separate database instances, and also how best to route to these?</p>
  
  <p>Any advice on how to go about this much appreciated.</p>