Is it possible to set the Heroku environment variable without restarting the application?
My application connects to various online services through OAuth2. For each service I connect to, I need to set an OAuth2 ID and secret. To save these configuration variables outside my code, I use environment variables and read them in process.env (node.js).
Each time I add a new service to my application, I need to add the appropriate environment variables for identifier and privacy. I need to do this before clicking on the last code so that the next time you start the application with a new service connection, OAuth2 identifiers and secret variables are available.
Currently my workflow is as follows:
- Set environment variables using the Heroku dashboard:
heroku config:set <SERVICE>_ID=foo <SERVICE>_SECRET=bar - Click the latest code:
git push heroku master
Both of these operations are currently restarting the application. I would prefer that the first operation does not restart the application, since changes to these configuration vars should not take effect until step 2). By restarting in step 1), my application will experience unnecessary downtime.
So, is there a way to prevent step 1) from restarting the application?
source share