Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set :location, "captest"
- role :web, "#{location}" # Your HTTP server, Apache/etc
- role :app, "#{location}" # This may be the same as your `Web` server
- role :db, "#{location}", :primary => true # This is where Rails migrations will run
- set :use_sudo, false
- set :local_user, "aslaen"
- set :deploy_to, "/home/aslaen/#{application}"
- set :deploy_via, :copy
- set :copy_dir, "~/cap/tmp"
- set :copy_remote_dir, "/home/aslaen/cap/tmp"
- # Custom tasks for our hosting environment.
- namespace :remote do
- desc <<-DESC
- Fix permissions root:root other+x
- DESC
- task :fix_permissions do
- print "fixing permissions again....,\n"
- run "chown -R root:root #{latest_release}; chmod -R o=rX #{latest_release}"
- desc <<-DESC
- Create directory required by copy_remote_dir.
- DESC
- task :create_copy_remote_dir, :roles => :app do
- print " creating #{copy_remote_dir},\n"
- run "mkdir -p #{copy_remote_dir}"
- desc <<-DESC
- Create a symlink to the application
- DESC
- task :create_symlink, :roles => :web do
- print " creating symlink /var/www/html/#{application} -> #{current_path},\n"
- run "ln -s #{current_path} /var/www/html/#{application}"
- end
- end
- end
- end
- # Custom tasks for our local machine.
- namespace :local do
- desc <<-DESC
- Create directory required for copy_dir.
- DESC
- task :create_copy_dir do
- print " creating #{copy_dir},\n"
- system "mkdir -p #{copy_dir}"
- end
- end
- # Callbacks
- before 'deploy:setup', 'local:create_copy_dir', 'remote:create_copy_remote_dir'
- after 'deploy:setup', 'remote:create_symlink'
- after 'deploy:symlink', 'remote:fix_permissions'
- #namespace :deploy do
- # task :migrate do
- # puts " not doing migrate because not a Rails application."
- # end
- # task :finalize_update do
- # puts " not doing finalize_update because not a Rails application."
- # end
- # task :start do
- # puts " not doing start because not a Rails application."
- # end
- # task :stop do
- # puts " not doing stop because not a Rails application."
- # end
- # task :restart do
- # puts " not doing restart because not a Rails application."
- # end
- #end
- set :repository, "./public"
- set :scm, :none
Add Comment
Please, Sign In to add comment