Skip to content

Instantly share code, notes, and snippets.

@kirs
Created September 11, 2011 19:59
Show Gist options
  • Save kirs/1210044 to your computer and use it in GitHub Desktop.
Save kirs/1210044 to your computer and use it in GitHub Desktop.
set :application, "example"
set :repository, "git@github.com:kirs/example.git"
set :scm, :git
set :domain, "example@example.com"
set :use_sudo, false
set :deploy_to, "/var/www/#{application}"
set :keep_releases, 3
set :normalize_asset_timestamps, false
namespace :deploy do
desc "Make symlinks"
task :make_symlinks, :roles => :web do
# yii
run "ln -sf #{shared_path}/yii #{current_path}/../yii"
# web
run "ln -sf #{shared_path}/assets #{release_path}/assets"
run "ln -sf #{shared_path}/runtime #{release_path}/protected/runtime"
end
end
role :web, domain
role :app, domain
role :db, domain, :primary => true
# to remove old releases
# see :keep_releases
after "deploy:update", "deploy:cleanup"
after "deploy:symlink", "deploy:make_symlinks"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment