foodsoft/config/deploy.rb.SAMPLE

47 lines
1.6 KiB
Text
Raw Normal View History

#
# Capistrano 3 deployment configuration
#
# http://www.capistranorb.com/
# https://semaphoreapp.com/blog/2013/11/26/capistrano-3-upgrade-guide.html
# defaults that can be updated from the environment
set :branch, ENV["REVISION"] || ENV["BRANCH_NAME"] || "master"
# you probably want to change these
set :application, 'foodsoft' # application name (whatever you like)
set :domain, 'order.foodcoop.test' # host
set :user, 'deploy' # ssh deploy user
set :default_stage, 'staging' # default environment, see config/deploy/
set :keep_releases, 10
set :repo_url, 'git://github.com/foodcoops/foodsoft.git'
set :deploy_to, "/www/apps/#{fetch :unique_app_name}"
# more settings which are probably ok
set :log_level, :info
set :linked_files, %w{config/database.yml config/app_config.yml config/initializers/secret_token.rb}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
# assuming one server for everything, with one user for deploy and one for resque
server fetch(:domain), user: fetch(:user), roles: [:web, :app, :resque, :db]
# if you use RVM, uncomment the line in Capfile, and optionally uncomment rvm settings
2013-05-25 19:38:14 +02:00
# set :rvm_ruby_string, :local
# task hooks
namespace :deploy do
2013-05-25 19:38:14 +02:00
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# tell mod_passenger to reload the application
execute :touch, release_path.join('tmp/restart.txt')
end
end
2013-05-25 19:38:14 +02:00
after :restart, 'resque:restart'
2013-05-25 19:38:14 +02:00
after :finishing, 'deploy:cleanup'
2013-05-25 19:38:14 +02:00
end
2013-05-25 19:38:14 +02:00