Giter Site home page Giter Site logo

capistrano-recipes's Introduction

Capistrano Recipes

Useful Capistrano recipes including:

  • Create MySQL database and user on server (via prompts)

  • Create standalone copy of database.yml in shared path (via prompts)

  • Log rotation and tailing commands

  • Restart and profile Phusion Passenger application server

  • Configure, start/stop/restart Unicorn application server

  • Send commands to God or Bluepill monitoring tools

  • Send commands to Thinking Sphinx

Included Tasks

  • cap db:create_yaml

  • cap db:mysql:setup

  • cap db:mysql:dump

  • cap db:mysql:fetch_dump

  • cap db:mysql:restore

  • cap log:rotate

  • cap log:tail

  • cap passenger:bounce

  • cap passenger:memory

  • cap passenger:status

  • cap nginx:setup

  • cap nginx:start

  • cap nginx:stop

  • cap nginx:restart

  • cap nginx:status

  • cap unicorn:start

  • cap unicorn:stop

  • cap unicorn:restart

  • cap unicorn:setup

  • cap symlinks:make

  • cap god:setup

  • cap god:implode

  • cap god:restart

  • cap god:reload

  • cap god:status

  • cap god:terminate

  • cap god:start

  • cap god:stop

  • cap god:quit

  • cap bluepill:install

  • cap bluepill:init

  • cap bluepill:start

  • cap bluepill:restart

  • cap bluepill:stop

  • cap bluepill:status

  • cap sphinx:config

  • cap sphinx:start

  • cap sphinx:stop

  • cap sphinx:rebuild

  • cap sphinx:index

  • cap sphinx:symlinks

Installation

Easy as pie…

Ensure you have the Capistrano gem installed:

sudo gem install capistrano

Optionally install the Capistrano extensions gem to give you multistage support:

sudo gem install capistrano-ext

Install this gem:

sudo gem install capistrano-recipes --source=http://gemcutter.com

To setup the initial Capistrano deploy file, go to your Rails app folder via command line and enter:

capify .

Configuration

Inside the newly created config/deploy.rb, add:

require 'capistrano/ext/multistage' # only require if you've installed Cap ext gem

# This one should go at the end of your deploy.rb
require 'capistrano_recipes'

RVM

RVM is enabled by default. You can disable it by setting :using_rvm to false, or leverage it by setting your rvm_ruby_string to appropriate ones (default is ree)

If using_rvm is true, the rvm recipe will load rvm’s own capistrano extensions so you don’t have to worry about it during deploy. Just make sure you have everything set up right, like .rvmrc on project root and system-wide install on the servers.

See (rvm.beginrescueend.com/rvm/install) for more info.

Nginx

If you’re using nginx as your web server, set :web_server to :nginx and deploy:setup will generate the appropriate configuration file for it based on your other variables, such as :application_uses_ssl, etc.

Passenger

If you’re running Phusion Passenger (www.modrails.com) be sure you add this line to config/deploy.rb:

set :server, :passenger

Unicorn

If you’re running Unicorn (unicorn.bogomips.org/) be sure to add this line instead:

set :server, :unicorn

Contributors (thank you!)

  • Rogério Augusto

  • Leonardob Bighetti

Copyright © 2009-2011 Webficient LLC, Phil Misiowiec. See LICENSE for details.

capistrano-recipes's People

Contributors

leonardobighetti avatar philm avatar rogerio-augusto avatar e1senh0rn avatar

Watchers

 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.