title: How to switch different config file running flask with uwsgi
body: <p>I am deploying my flask app with uwsgi to multiple servers.
  Different server should run the same app but read different config file. There are two config file used in my app.
  one is 'config.py' read by flask:</p>
  
  <pre><code>app.config.from_object('config')
  </code></pre>
  
  <p>another is the 'uwsgi_config.ini' which is used when starting uwsgi:</p>
  
  <pre><code>uwsgi uwsgi_config.ini
  </code></pre>
  
  <p>Since I have several server, I must write several config files like:
  config.dev.py config.test.py config.prod.py
  uwsgi_config.dev.py uwsgi_config.dev.py uwsgi_config.prod.py</p>
  
  <p>So my question is how can I switch different tiers when starting uwsgi without hacking the source code every time ?</p>
  
  <p>I think the key thing is I should run uwsgi like this:</p>
  
  <pre><code>uwsgi uwsgi_config.dev.ini
  </code></pre>
  
  <p>and then flask can read the 'dev' tier from uwsgi_config.dev.ini.
  Is there a simple way to do this ? </p>