Skip to content

albabar/capistrano-erb-uploader

Repository files navigation

Capistrano ERB Uploader

Parse various ERB template based configuration files and upload them with Capistrano.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-erb-uploader'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-erb-uplaader

Then add this line in your Capfile

require 'capistrano/erb-uploader'

Usage

You can list a bunch of ERB templates to parse and upload in your deploy.rb file.

set :erb_files, fetch(:erb_files, []).push('config/nginx.conf.erb', 'config/app.monit.erb')

You might also use this on your own task:

namespace :some do
  desc 'Some task to upload specialised erb files'
  task :task do
    on roles(:app)
      upload_erb 'config/deploy/templates/some.conf.erb', 'config/some.conf'  
      execute :sudo, 'service some restart'
    end
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/albabar/capistrano-erb-uplaader.

License

The gem is available as open source under the terms of the MIT License.

About

Parse n Upload ERB files with Capistrano

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages