title: django deploying separate web & api endpoints on heroku
body: <p>I have a web application with an associated API and database. </p>
  
  <p>I'd like to use the same Django models in the API, but have it served separately by different processes so I can scale it independently. </p>
  
  <p>I also don't need the API to serve static assets, or any of the other views. </p>
  
  <p>The complication is that the routes I have defined have the API and the webapp sharing the root domain:</p>
  
  <pre><code>http://domain.com/normal/application/stuff
  http://domain.com/api/different/stuff
  </code></pre>
  
  <p>and additionally my Django apps depend on each other's models and constants (so two different <code>settings.py</code> files with different <code>INSTALLED_APPS</code> doesn't quite solve it). </p>
  
  <p>I guess one way is I could define different processes in my Procfile which just start the Django app, but that in one of the processes it might have different environment variables? I don't think I can change the environment per Proc with <code>heroku:config</code>, I think it would actually have to be a directive in the Procfile. </p>
  
  <p>Anyone have any experience or insight with this? Thanks!</p>