GithubHelp home page GithubHelp logo

capistrano-strategy-copy-bundled's Introduction

Capistrano Strategy: Copy Bundled

This recipe for capistrano utilizes the regular copy strategy. However, instead of bundling the gems on the remote servers, they are already pre-bundled on the deploy machine and sent as one package.

In some networks, due to security reasons, production servers are not allowed to access the internal company network. When that is the case, you are not able access your internally written gems. Also, those kind of servers usually, and intentionally, have no version control installed or are behind a firewall with blocked access to rubygems, github, etc.

This capistrano recipe tries to help out with that.

Installation

System wide usage

gem install 'capistrano-strategy-copy-bundled'

In your Gemfile

gem 'capistrano-strategy-copy-bundled'

Usage

As this recipe does it's own bundling, there is not need to: require 'bundler/capistrano'.

All you have to do in your config/deploy.rb:

require 'capistrano-strategy-copy-bundled'
set :deploy_via,    :copy_bundled           # bundle gems locally and send them packed to all servers

Additionally to that, you can set the usual options when using the regular :copy strategy for capistrano, like:

set :copy_dir,      "/tmp/#{application}"   # path where files are temporarily put before sending them to the servers
set :copy_exclude,  ".git*"                 # we exclude the .git repo so that nobody is able to temper with the release

#Callback triggers to add your own steps within (in order)
on 'strategy:before:bundle',      'some:custom:task'
on 'strategy:after:bundle',       'some:custom:task'
on 'strategy:before:compression', 'some:custom:task'
on 'strategy:after:compression',  'some:custom:task'
on 'strategy:before:distribute',  'some:custom:task'
on 'strategy:after:distribute',   'some:custom:task'

Copyright © 2011-2012 Rudolf Schmidt. Released under the MIT license.

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.