How to configure Node.js app for deis deployment

I want to deploy Ponte with deis into my CoreOS cluster and configure Ponte to use an external MongoDb which can be setup via a configuration file provided on start. But deis recommends to make configurations available via environment variables to allow configuration changes to be tracked.

What is the recommended way to deploy Ponte?

  1. putting a configuration file into the repository and deploy Ponte via node.js Buildpack
  2. creating a dockerfile (e.g. based on devbase-ponte) in a new repositiory containing the configuration and version control it seperatly
  3. Create a dockerfile which setups the configuration file needed based on environment variables to support configuration via deis
  4. Something more clever...

Edit: It turns out that this is a common question. A similar discussion with a list of options is by the node-red team (github.com/node-red/node-red/issues/603).