Heroku-Lockdown is a plugin for the heroku gem for people using heroku in production. If you are running more than one heroku server for the same app (maybe myapp-production, and myapp-staging), you might be worried about typing;
heroku db:reset --myapp-production
when you meant
heroku db:reset --myapp-staging
which would be a disaster. This plugin should help prevent that with a simple config file, ~/.herokurc
-
Assuming you have the heroku gem installed:
heroku plugins:install git://github.com/latentflip/heroku-lockdown.git
-
Create/edit ~/.herokurc
-
Add a line for each command and app pair you want to prevent, like so:
#This will prevent db:reset being run on --app myapp-production protect myapp-production db:reset
-
I accept no responsibility for this not actually working :). So test it with some safe commands (perhaps db:pull) first.
-
Only tested so far on heroku setups where you have to add –app to commands. (i.e. more than one heroku app for a single git repo). If commands like: ‘heroku db:pull’ run without requiring the –app switch this may not work.