I am trying to setup a staging env for my app on Heroku . And everytime I push my repo it deploys/runs the application in production
mode. What do I need to do to make the app run in some other mode.
See the last section in this Heroku article on Configuration and Config Vars .
In brief, though:
$ heroku config:add RACK_ENV=staging RAILS_ENV=staging
Also be careful not to miss the note that accompanies that section:
You should never set
RACK_ENV=development
, as that will enable reloading and slow down your app's dyno significantly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.