Skip to content

Instantly share code, notes, and snippets.

@gnurag
Created October 16, 2012 07:25
Show Gist options
  • Save gnurag/3897763 to your computer and use it in GitHub Desktop.
Save gnurag/3897763 to your computer and use it in GitHub Desktop.
Capfile
set :application, "brogram"
# more configs
set :deploy_to, "/deploy/path/webapps/#{application}"
set :shared_path, "#{deploy_to}/shared"
set :etc_path, "/etc/brogram"
# more configs
# here be tasks
desc "Start Bro Gram"
task :start, :roles => :app do
run "thin start -c #{deploy_to}/current -C #{etc_path}/thin_production.yml"
end
# symlink stuff be here
desc "Symlink shared resources on each release"
task :symlink_shared, :roles => :app do
run "ln -nfs #{etc_path}/database.yml #{release_path}/config/database.yml"
run "ln -nfs #{etc_path}/mongoid.yml #{release_path}/config/mongoid.yml"
run "ln -nfs #{etc_path}/config.yml #{release_path}/config/config.yml"
run "ln -nfs #{etc_path}/thin_production.yml #{release_path}/config/thin_production.yml"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment