PageRenderTime 41ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/JakubOboza/genetic-algorithms
Ruby | 52 lines | 38 code | 14 blank | 0 comment | 0 complexity | f739b4497fe510c4fd7a20fecb417225 MD5 | raw file
  1. require 'bundler/capistrano'
  2. require "rvm/capistrano"
  3. require 'capistrano/ext/multistage'
  4. load 'deploy/assets'
  5. set :rvm_ruby_string, '1.9.2-p320'
  6. set :user, "appserver"
  7. set :application, "genetic_algorithms"
  8. set :repository, "git@bitbucket.org:JakubOboza/genetic-algorithms.git"
  9. set :scm, :git
  10. set :deploy_to, "/var/www/#{application}"
  11. set :rvm_path, "/home/appserver/.rvm"
  12. set :rvm_type, :user
  13. set :default_stage, :autodeploy
  14. namespace :deploy do
  15. task :restart do
  16. run "ruby #{current_path}/bin/run.rb stop"
  17. run "ruby #{current_path}/bin/run.rb start"
  18. end
  19. task :link_db_config do
  20. ["configuration.yaml"].each do |name|
  21. db_config = "#{release_path}/config/#{name}"
  22. shared_db_config = "#{shared_path}/config/#{name}"
  23. run "ln -s #{shared_db_config} #{db_config}"
  24. end
  25. end
  26. namespace :assets do
  27. task :precompile do
  28. end
  29. task :update_asset_mtimes do
  30. end
  31. end
  32. end
  33. namespace :bundle do
  34. task :install do
  35. run ""
  36. end
  37. end
  38. after "deploy:update_code", "deploy:link_db_config"