Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'torquebox-capistrano-support'
- require 'bundler/capistrano'
- set :use_sudo, false
- set :rvm_type, :system
- set :rvm_ruby_string, 'jruby-1.6.7@entercamp'
- require "rvm/capistrano" # Load RVM's capistrano plugin.
- set :stages, %w(staging production)
- set :default_stage, "staging"
- require 'capistrano/ext/multistage'
- set :application, "entercamp"
- # ssh to the deploy server
- default_run_options[:pty] = true
- # setup scm:
- set :repository, "git@bitbucket.org:myapp.git"
- set :deploy_via, :remote_cache
- set :scm_username, "myusername"
- set :scm, :git
- set :scm_verbose, "true"
- set :branch, "master"
- ssh_options[:forward_agent] = true
- # set path
- set(:releases_path) { File.join(deploy_to, version_dir) }
- set(:shared_path) { File.join(deploy_to, shared_dir) }
- set(:current_path) { File.join(deploy_to, current_dir) }
- set(:release_path) { File.join(releases_path, release_name) }
- # set gems
- set :bundle_without, [:development,:test]
- namespace :rvm do
- task :trust_rvmrc do
- run "rvm rvmrc trust #{current_release}"
- end
- end
- namespace :deploy do
- task :start do
- run "export LAUNCH_JBOSS_IN_BACKGROUND=1; rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'jruby-1.6.7@entercamp' -c 'jruby -S torquebox run'"
- end
- task :bootstrap do
- run "cd #{release_path}; jruby -S bundle exec rake bootstrap:roughly RAILS_ENV=#{rails_env}"
- end
- end
Add Comment
Please, Sign In to add comment