adds capistrano for deployment
This commit is contained in:
parent
a3df346110
commit
92d9a57f3f
3 changed files with 104 additions and 10 deletions
46
config/deploy.rb.SAMPLE
Normal file
46
config/deploy.rb.SAMPLE
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
require 'bundler/setup'
|
||||
require 'common_deploy'
|
||||
|
||||
set :application, 'foodsoft'
|
||||
set :domain, 'foodsoft.com'
|
||||
set :user, 'foodsoft'
|
||||
set :default_stage, 'staging'
|
||||
set :keep_releases, 5
|
||||
set :deploy_to, "/mnt/apps/#{application}_#{stage}"
|
||||
set :repository, 'git@github.com:foodcoops/foodsoft.git'
|
||||
|
||||
|
||||
# resque worker
|
||||
role :resque_worker, domain
|
||||
role :resque_scheduler, domain
|
||||
set :workers, { "foodsoft_notifier" => 1 }
|
||||
|
||||
|
||||
# rvm
|
||||
# set :rvm_ruby_string, :local
|
||||
|
||||
|
||||
server domain, :web, :app, :db
|
||||
|
||||
# Loads all needed capistrano extensions
|
||||
load_extensions :bundler,
|
||||
# :rvm, # if you are using rvm on your server uncomment this line
|
||||
:passenger,
|
||||
:multistage,
|
||||
:resque,
|
||||
:whenever,
|
||||
:assets
|
||||
|
||||
|
||||
# clean up old releases on each deploy
|
||||
after "deploy:restart", "deploy:cleanup"
|
||||
|
||||
# restart resque
|
||||
after "deploy:restart", "resque:restart"
|
||||
|
||||
# update cron
|
||||
after "deploy:restart", "whenever:update_crontab"
|
||||
|
||||
# install rvm and ruby on every deploy
|
||||
# before 'deploy', 'rvm:install_rvm' # update RVM
|
||||
# before 'deploy', 'rvm:install_ruby' # install Ruby and create gemset (both if missing)
|
||||
Loading…
Add table
Add a link
Reference in a new issue