Giter Club home page Giter Club logo

heroku_san's Introduction

Heroku San

Helpful rake tasks for Heroku.

Install

Rails 3

Add this to your Gemfile:

group :development do
  gem 'heroku_san'
end

Rails 2

To install add the following to config/environment.rb:

config.gem 'heroku_san'

Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:

begin
  require 'heroku_san/tasks'
rescue LoadError
  STDERR.puts "Run `rake gems:install` to install heroku_san"
end

Configure

In config/heroku.yml you will need to add the Heroku apps that you would like to attach to this project. You can generate this file by running:

rake heroku:create_config

Customize the file for your project. If this is a fresh project, heroku_san can create all the applications for you, and set each one’s RACK_ENV.

rake all heroku:create heroku:rack_env

Configure your Heroku apps according to config/heroku.yml by running:

rake all heroku:config

Usage

After configuring your Heroku apps you can use rake tasks to control the apps.

rake production deploy

A rake task with the shorthand name of each app is now available and adds that server to the list that subsequent commands will execute on. Because this list is additive, you can easily select which servers to run a command on.

rake demo staging restart

A special rake task ‘all’ is created that causes any further commands to execute on all heroku apps.

Manipulate collaborators on all this project’s apps (prompts for email address):

rake all heroku:share
rake all heroku:unshare

Need to add remotes for each app?

rake all heroku:remotes

A full list of tasks provided:

rake after_deploy              # Callback after deploys
rake all                       # Select all Heroku apps for later command
rake before_deploy             # Callback before deploys
rake capture                   # Captures a bundle on Heroku
rake console                   # Opens a remote console
rake db:pull                   # Pull the Heroku database
rake db:push                   # Push local database to Heroku database
rake deploy[commit]            # Pushes the given commit, migrates and restarts (default: HEAD)
rake deploy:force[commit]      # Force-pushes the given commit, migrates and restarts (default: HEAD)
rake heroku:apps               # Lists configured apps
rake heroku:apps:local         # Lists configured apps without hitting Heroku
rake heroku:config             # Add config:vars to each application
rake heroku:config:list        # Lists config variables as set on Heroku
rake heroku:config:list:local  # Lists local config variables without setting them
rake heroku:create             # Creates the Heroku app
rake heroku:create_config      # Creates an example configuration file
rake heroku:gems               # Generate the Heroku gems manifest from gem dependencies
rake heroku:maintenance        # Enable maintenance mode
rake heroku:maintenance_off    # Disable maintenance mode
rake heroku:push[commit]       # Pushes the given commit (default: HEAD)
rake heroku:push:force[commit] # Force-pushes the given commit (default: HEAD)
rake heroku:rack_env           # Add proper RACK_ENV to each application
rake heroku:rake[task]         # Runs a rake task remotely
rake heroku:remotes            # Add git remotes for all apps in this project
rake heroku:share              # Adds a collaborator
rake heroku:unshare            # Removes a collaborator
rake logs                      # Shows the Heroku logs
rake migrate                   # Migrates and restarts remote servers
rake restart                   # Restarts remote servers

Frequently used tasks are not namespaced, everything else lives under heroku.

Homepage

github.com/fastestforward/heroku_san

Issue Tracker

github.com/fastestforward/heroku_san/issues

Contributors

License

License

Copyright © 2009 Elijah Miller <[email protected]>, released under the MIT license.

heroku_san's People

Contributors

jqr avatar copyhacker avatar hsbt avatar bryan-ash avatar rahearn avatar mledom avatar leshill avatar andyhite avatar bjhess avatar johnbeynon avatar jellybob avatar lsemel avatar matschaffer avatar mrhaddad avatar mdub avatar ryanwood avatar dmathieu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.