I have a Flask application that uses different configuration files for development and production environments. The relevant piece of code is this:
app.config.from_object('config.dev')
app.config.from_envvar('SPOTPIX_SETTINGS', silent=True)
When I'm developing in my local server, the configurations are taken from config.dev, but when I push the code to Heroku, I would like to set the SPOTPIX_SETTINGS
environment variable to point to the 'config.prod' file. This can be done in the Heroku command line client like so:
heroku config:set SPOTPIX_SETTINGS=
However, I have no clue what should I write to the right of the equals sign, as I can't assign the absolute path of the production configuration file to the environment variable, because this is not the same in Heroku as it is in my development machine.