Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # config valid only for Capistrano 3.1
- lock '3.1.0'
- # rbenv
- set :rbenv_type, :user
- set :rbenv_ruby, '2.1.2'
- # bundler
- set :bundle_gemfile, -> { release_path.join('Gemfile') }
- set :bundle_dir, -> { shared_path.join('bundle') }
- #set :bundle_dir, -> { path: "/usr/bin/bundle" }
- set :bundle_flags, '--deployment --quiet'
- set :bundle_without, %w{development test}.join(' ')
- set :bundle_binstubs, -> { shared_path.join('bin') }
- set :bundle_roles, :all
- set :application, APP-NAME
- set :repo_url, GITHUB-URL
- # Default branch is :master
- # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
- # Default deploy_to directory is /var/www/my_app
- set :deploy_to, '/var/www/APP-NAME'
- # Default value for :linked_files is []
- set :linked_files, %w{config/database.yml}
- # Default value for linked_dirs is []
- set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
- # Default value for default_env is {}
- set :default_env, { path: "~/.rbenv/shims:~/.rbenv/bin:$PATH" }
- namespace :deploy do
- desc 'Restart application'
- task :restart do
- on roles(:app), in: :sequence, wait: 5 do
- # Your restart mechanism here, for example:
- execute :touch, release_path.join('tmp/restart.txt')
- end
- end
- after :publishing, :restart
- after :finishing, 'deploy:cleanup'
- end
- ~
- This ad is supporting your extension ruul (screen ruler): More info | Privacy Policy | Hide on this page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement