3 ms·
Good call on the Flask-Script mention. I will add a note about that. As far as configuration based on environment goes, I really dislike environment based conf
by mattupstate 13y ago
Good call on the Flask-Script mention. I will add a note about that.
As far as configuration based on environment goes, I really dislike environment based configuration in my project repository. So I use Flask's instance folder functionality:
http://flask.pocoo.org/docs/config/#instance-folders http://flask.pocoo.org/docs/config/#instance-folders
This file can be used to configure the app based on its environment wether it be local development or my production environment. The shared factory method attempts to load this file and fails silently if it does not exist.
Regarding your SQLAlchemy comment, well...thats just not really something to add to the article now, is it? ;)
- mattdeboard 13y agoYeah but how would this solve having identical app installations in dev, prod and staging?
- mattupstate 13y agoThe settings.cfg file that I place in the instance folder is generally placed on the server during deployment. Any values in this file will override defaults. I generally do this with Chef or Fabric. Perhaps that answers your question