Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/latentflip/heroku-lockdown


https://github.com/latentflip/heroku-lockdown

Last synced: 30 days ago
JSON representation

Awesome Lists containing this project

README

        

= Heroku-Lockdown
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

== Installation
* Assuming you have the heroku gem installed:

heroku plugins:install git://github.com/latentflip/heroku-lockdown.git

== Usage
* 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

== Warning
* 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.