Created
March 21, 2013 01:07
-
-
Save davidchua/5209920 to your computer and use it in GitHub Desktop.
Capistrano Deploy Recipe for Non-Rails App (PHP/HTML)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "<name>" | |
set :repository, "<repo>" | |
set :deploy_to, "/path/to/name" | |
set :user, 'deployer' | |
set :use_sudo, false | |
set :rvm_type, :system | |
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
role :web, "<ip>" # Your HTTP server, Apache/etc | |
role :app, "<ip>" # This may be the same as your `Web` server | |
role :db, "<ip>", :primary => true # This is where Rails migrations will run | |
# if you want to clean up old releases on each deploy uncomment this: | |
# after "deploy:restart", "deploy:cleanup" | |
# if you're still using the script/reaper helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# If you are using Passenger mod_rails uncomment this: | |
# | |
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 | |
# namespace :assets do | |
# task :precompile, :roles => :web, :except => { :no_release => true } do | |
# from = source.next_revision(current_revision) | |
# if capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0 | |
# run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile} | |
# else | |
# logger.info "Skipping asset pre-compilation because there were no asset changes" | |
# end | |
# end | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment