Created
September 24, 2009 21:09
-
-
Save noginn/193055 to your computer and use it in GitHub Desktop.
A Capistrano deployment recipe for Zend Framework applications
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
load 'application/configs/deploy' |
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, "application-name" | |
set :repository, "/path/to/repository" | |
set :deploy_to, "/path/to/application" | |
set :deploy_via, "copy" | |
set :scm, :git | |
set :scm_checkout, "export" | |
role :web, "domain" | |
role :app, "domain" | |
role :db, "domain", :primary => true | |
set :user, "user" | |
set :use_sudo, false | |
set :ssh_options, {:forward_agent => true} | |
namespace :deploy do | |
task :update do | |
transaction do | |
update_code | |
symlink | |
end | |
end | |
task :finalize_update do | |
transaction do | |
run "chmod -R g+w #{releases_path}/#{release_name}" | |
# Create symbolic links to shared resources | |
run "ln -nfs #{shared_path}/bootstrap.php #{releases_path}/#{release_name}/application/configs/bootstrap.php" | |
end | |
end | |
task :migrate do | |
# Override, we have no migrations | |
end | |
task :start, :roles => :app do | |
# Override but do nothing | |
end | |
task :stop, :roles => :app do | |
# Override but do nothing | |
end | |
task :restart do | |
# Override, no need to restart Apache | |
end | |
end |
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
In your shell, run the following command: | |
cap deploy | |
This will now deploy your Zend Framework application to the remote server. | |
For more information and Capistrano installation instructions see the documentation, http://www.capify.org/index.php/Capistrano |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment