Guest User

Untitled

a guest
Nov 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. require 'torquebox-capistrano-support'
  2. require 'bundler/capistrano'
  3.  
  4. set :use_sudo, false
  5. set :rvm_type, :system
  6. set :rvm_ruby_string, 'jruby-1.6.7@entercamp'
  7. require "rvm/capistrano" # Load RVM's capistrano plugin.
  8.  
  9. set :stages, %w(staging production)
  10. set :default_stage, "staging"
  11. require 'capistrano/ext/multistage'
  12.  
  13. set :application, "entercamp"
  14.  
  15. # ssh to the deploy server
  16. default_run_options[:pty] = true
  17.  
  18. # setup scm:
  19. set :repository, "git@bitbucket.org:myapp.git"
  20. set :deploy_via, :remote_cache
  21. set :scm_username, "myusername"
  22. set :scm, :git
  23. set :scm_verbose, "true"
  24. set :branch, "master"
  25. ssh_options[:forward_agent] = true
  26.  
  27. # set path
  28. set(:releases_path) { File.join(deploy_to, version_dir) }
  29. set(:shared_path) { File.join(deploy_to, shared_dir) }
  30. set(:current_path) { File.join(deploy_to, current_dir) }
  31. set(:release_path) { File.join(releases_path, release_name) }
  32.  
  33.  
  34. # set gems
  35. set :bundle_without, [:development,:test]
  36.  
  37. namespace :rvm do
  38. task :trust_rvmrc do
  39. run "rvm rvmrc trust #{current_release}"
  40. end
  41. end
  42.  
  43. namespace :deploy do
  44. task :start do
  45. 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'"
  46. end
  47.  
  48. task :bootstrap do
  49. run "cd #{release_path}; jruby -S bundle exec rake bootstrap:roughly RAILS_ENV=#{rails_env}"
  50. end
  51. end
Add Comment
Please, Sign In to add comment