Skip to content

Instantly share code, notes, and snippets.

@Sergey-B
Last active December 19, 2015 18:29
Show Gist options
  • Select an option

  • Save Sergey-B/5999118 to your computer and use it in GitHub Desktop.

Select an option

Save Sergey-B/5999118 to your computer and use it in GitHub Desktop.
Template for use deployconfig gem (works local)
# template1.rb
application_name = ask("Please enter your application name:")
gem 'deployconfig', '0.0.1', :path => '/home/sergey/documents/Projects/Rails/deployconfig'#:git => 'git@github.com:Sergey-B/deployconfig-generator.git'#
gem 'capistrano'
gem 'capistrano-ext'
gem_group :assets do
gem 'therubyracer', :platforms => :ruby
end
run 'bundle install'
file 'config/deploy.rb', <<-CODE
require '/home/sergey/documents/Projects/Rails/deployconfig/lib/deployconfig'
require 'capistrano/ext/multistage'
set :application, "#{application_name}"
CODE
file 'Capfile',<<-CODE
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks
CODE
# run 'capify .'
run 'rails g deploy'
run 'rails g unicorn'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment