GithubHelp home page GithubHelp logo

cdambo / capistrano-shared-file Goto Github PK

View Code? Open in Web Editor NEW

This project forked from damselem/capistrano-shared-file

0.0 2.0 0.0 60 KB

Capistrano recipe to upload, download and symlink shared files.

License: MIT License

Ruby 100.00%

capistrano-shared-file's Introduction

capistrano-shared-file

A Capistrano recipe to upload, download and symlink configuration files like config/database.yml or config/application.yml to or from your remote servers. Heavily inspired by teohm's capistrano-shared_file gem.

Install

gem install capistrano-shared-file

For Bundler, add this to your Gemfile:

gem 'capistrano-shared-file'

Usage

Add the following lines to config/deploy.rb:

set :shared_files, %w(config/database.yml)
require 'capistrano-shared-file'

Tasks

Upload

To upload all the files defined in the shared_files capistrano variable to a remote server, you can execute:

bundle exec cap shared_file:upload

With backup (locally):

bundle exec cap shared_file:upload[-b]

Download

To download all the files defined in the shared_files capistrano variable from a remote server, you can execute:

bundle exec cap shared_file:download

With backup (locally):

bundle exec cap shared_file:download[-b]

Symlink

To symlink the uploaded configuration files to the current release path, you can execute:

bundle exec cap shared_file:symlink

This task will be executed on every deploy. If you happen to make any changes in the files specified in the shared_files capistrano variable, make sure you upload them.

Note: You can use it together with capistrano/ext/multistage like:

bundle exec cap <STAGE> shared_file:upload
bundle exec cap <STAGE> shared_file:download

capistrano-shared-file's People

Contributors

cdambo avatar damselem avatar

Watchers

 avatar  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.