Created
November 8, 2011 13:06
-
-
Save memphys/1347692 to your computer and use it in GitHub Desktop.
Capistrano config for simple php project
This file contains hidden or 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, "application_name" | |
default_run_options[:pty] = true | |
set :scm, :git | |
set :repository, "[email protected]:memphys/application_name.git" | |
# setting ssh port and option to use ssh-keys stored on local machine | |
set :ssh_options, {:forward_agent => true, :port => 8822} | |
server "81.222.216.146", :app, :web, :db, :primatry => true | |
set :deploy_to, "/var/www/#{application}" | |
set :deploy_via, :remote_cache | |
set :user, "root" | |
set :use_sudo, false | |
set :branch, "master" | |
set :keep_releases, 3 | |
namespace :deploy do | |
task :update do | |
transaction do | |
update_code | |
symlink | |
end | |
end | |
task :start do | |
end | |
desc "Symlink static directories that need to remain between deployments." | |
task :create_dirs do | |
run "mkdir -p #{shared_path}/data" | |
run "chmod -R 777 #{shared_path}/data" | |
run "ln -nfs #{shared_path}/data #{release_path}/data" | |
end | |
task :stop do | |
end | |
task :finalize_update do | |
end | |
task :migrate do | |
# nothing | |
end | |
task :restart do | |
# nothing | |
end | |
end | |
after "deploy:finalize_update", "deploy:create_dirs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment