Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set :application, "blog.pgk"
- server "10.144.52.66", :app, :web, :db, :primary => true
- set :user, "apps"
- set :deploy_to "/home/apps/apps/#{application}"
- set :scm, :git
- set :repository, "git@github.com:khannz/beginningRails3.git"
- set :use_sudo, false
- # Deploy task
- namespace :deploy do
- task :copy_database_configuration do
- production_db_config = "/media/vb_share/blog/config/database.yml"
- run "cp #{production_db_config} #{release_path}/config/database.yml"
- end
- task :restart do
- run "touch #{deploy_to}/current/tmp/restart.txt"
- end
- after "deploy:update_code", "deploy:copy_database_configuration"
- end
- namespace :assets do
- task :symlink, :roles => :app do
- assets.create_dirs
- run <<-CMD
- #rm -rf #{release_path}/config/database.yml &&
- #ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml
- CMD
- end
- task :create_dirs, :roles => :app do
- %w(index pictures).each do |name|
- run "mkdir -p #{shared_path}/#{name}"
- end
- end
- end
- after "deploy:update_code", "assets:symlink"
Add Comment
Please, Sign In to add comment