Advertisement
blainarm387

Untitled

Jun 1st, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.34 KB | None | 0 0
  1. # What is the name of the local application?
  2. set :application, "appname"
  3.  
  4. # What user is connecting to the remote server?
  5. set :user, "moi"
  6.  
  7. #ssh_options[:forward_agent] = true
  8. default_run_options[:pty] = true
  9.  
  10. # Where is the local repository?
  11. set :repository,  "file:///D:/User/Moi/web_docs/appname"
  12.  
  13. # What is the production server domain?
  14. role :web, "hostname.domain"
  15.  
  16. # What remote directory hosts the production website?
  17. set :deploy_to,   "/home/moi/web_docs/appname"
  18.  
  19. # Is sudo required to manipulate files on the remote server?
  20. set :use_sudo, false
  21.  
  22. # What version control solution does the project use?
  23. set :scm,        :git
  24. set :branch,     'master'
  25.  
  26. # How are the project files being transferred?
  27. set :deploy_via, :remote_cache
  28.  
  29. # Maintain a local repository cache. Speeds up the copy process.
  30. set :copy_cache, true
  31.  
  32. # Ignore any local files?
  33. set :copy_exclude, %w(.git)
  34.  
  35. # This task symlinks the proper .htaccess file to ensure the
  36. # production server's APPLICATION_ENV var is set to production
  37. task :create_symlinks, :roles => :web do
  38.   run "rm #{current_release}/public/.htaccess"
  39.   run "ln -s #{current_release}/production/.htaccess
  40.             #{current_release}/public/.htaccess"
  41. end
  42.  
  43. # After deployment has successfully completed
  44. # create the .htaccess symlink
  45. after "deploy:finalize_update", :create_symlinks
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement