You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
2.7 KiB

SSHKit.config.command_map[:rake] = 'bundle exec rake'
require 'seed-fu/capistrano3'
# --------------------------------------------------
# TODO: Set up the name of your application here
set :application, 'madloba'
# TODO: Set up the absolute path where your Madloba application is located, on your server.
# (eg: '/home/username/madloba')
set :deploy_to, '/absolute/madloba_app/path'
# --------------------------------------------------
set :repo_url, 'git@github.com:etiennebaque/madloba.git'
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
set :branch, 'master'
# Default value for :scm is :git
set :scm, :git
# Variable added for delayed job
set :rails_env, 'production'
# Default value for :format is :pretty
# set :format, :pretty
# Default value for :log_level is :debug
# set :log_level, :debug
# Default value for :pty is false
# set :pty, true
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# Default value for keep_releases is 5
# set :keep_releases, 5
# Number of delayed_job workers
# default value: 1
# set :delayed_job_workers, 2
# String to be prefixed to worker process names
# This feature allows a prefix name to be placed in front of the process.
# For example: reports/delayed_job.0 instead of just delayed_job.0
set :delayed_job_prefix, :madloba
# Delayed_job queue or queues
# Set the --queue or --queues option to work from a particular queue.
# default value: nil
# set :delayed_job_queues, ['mailer','tracking']
# Specify different pools
# You can use this option multiple times to start different numbers of workers for different queues.
# default value: nil
# set :delayed_job_pools, {
# :mailer => 2,
# :tracking => 1,
# :* => 2
# }
# Set the roles where the delayed_job process should be started
# default value: :app
# set :delayed_job_roles, [:app, :background]
# Set the location of the delayed_job executable
# Can be relative to the release_path or absolute
# default value 'bin'
# set :delayed_job_bin_path, 'script' # for rails 3.x
set :linked_files, %w{config/database.yml config/secrets.yml .rbenv-vars}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
set :assets_roles, [:web, :app]
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end
after :publishing, 'deploy:restart'
after :finishing, 'deploy:cleanup'
end
before 'deploy:publishing', 'db:seed_fu'
after 'deploy:published', 'restart' do
invoke 'delayed_job:restart'
end