Skip to content

Instantly share code, notes, and snippets.

@noginn

noginn/Capfile

Created Sep 24, 2009
Embed
What would you like to do?
A Capistrano deployment recipe for Zend Framework applications
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'application/configs/deploy'
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
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
You can’t perform that action at this time.