Capistrano deploy.rb


/ Published in: Ruby
Save to your folder(s)

simply capistrano deploy recipe, including a sample shared link setup for Joomla configuration.php


Copy this code and paste it in your HTML
  1. set :application, "svnrepo" #use the name of the repo
  2. set :domain, "my.domain.com" #domain where project resides
  3. set :user, "sshusername" #your ssh username
  4. set :runner, user
  5. set :svn_user, "svnusername" #your svn username
  6. set :repository, Proc.new { "--username #{svn_user} " + "http://my.domain.com/svn/SVN-REPO-NAME/trunk" }
  7. set :deploy_to, "/path/to/site"
  8. set :keep_releases, 1
  9. set :deploy_via, :remote_cache
  10.  
  11. role :app, domain
  12. role :web, domain
  13. role :db, domain, :primary => true
  14.  
  15. namespace :deploy do
  16. [:start, :stop, :restart, :finalize_update, :migrate, :migrations, :cold].each do |t|
  17. desc "#{t} task is a no-op with mod_rails"
  18. task t, :roles => :app do ; end
  19. end
  20. end
  21.  
  22. #this is for Rails
  23. #namespace :deploy do
  24. # [:start, :stop].each do |t|
  25. # desc "#{t} task is a no-op with mod_rails"
  26. # task t, :roles => :app do ; end
  27. # end
  28. #end
  29.  
  30. #this is for Joomla sites
  31. #after "deploy:update_code" do
  32. # run "ln -s #{shared_path}/configuration.php #{release_path}/"
  33. #end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.