Skip to content

Instantly share code, notes, and snippets.

@kix
Created May 28, 2012 14:21
Show Gist options
  • Save kix/2819428 to your computer and use it in GitHub Desktop.
Save kix/2819428 to your computer and use it in GitHub Desktop.
Capifony deploy with Composer (c) @iDotsent
set :application, "Partner cabinet"
set :domain, "domain"
set :deploy_to, "/app/name"
set :app_path, "app"
set :repository, "ssh://git@somewhere.com/project.git"
set :scm, :git
set :model_manager, "doctrine"
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :keep_releases, 3
set :shared_files, ["app/config/parameters.ini"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", app_path + "/cache", "vendor"]
set :dump_assetic_assets, true
set :update_vendors,false
set :use_composer, true
set :use_sudo, false
set(:composer_bin) { "#{shared_path}/composer.phar" }
namespace :symfony do
after "deploy:setup", "symfony:composer:download"
namespace :composer do
desc "Download composer.phar"
task :download do
run "wget http://getcomposer.org/composer.phar -q -O #{composer_bin}"
run "chmod +x #{composer_bin}"
end
desc "Runs composer install to install vendors from composer.lock file"
task :install do
logger.info "Installing package"
run "cd #{latest_release} && #{php_bin} -dallow_url_fopen=true #{composer_bin} --no-ansi install"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment