Created
January 27, 2016 13:05
-
-
Save richardsweeney/156eab9ffe2338130fdb to your computer and use it in GitHub Desktop.
capistrano basic config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :application, 'capistrano' | |
| set :repo_url, '[email protected]:capistrano/wordpress.git' | |
| set :scm, :git | |
| set :ssh_options, { :forward_agent => true, } | |
| set :deploy_via, :remote_cache | |
| set :copy_exclude, [".git", ".DS_Store", ".gitignore", ".gitmodules"] | |
| set :linked_dirs, %w{content/uploads content/cache} | |
| set :composer_install_flags, '--no-dev --prefer-dist --no-scripts --optimize-autoloader' | |
| set :composer_roles, :all | |
| namespace :deploy do | |
| desc 'Restart application' | |
| task :restart do | |
| on roles(:app), in: :sequence, wait: 5 do | |
| # Your restart mechanism here, for example: | |
| end | |
| end | |
| after :restart, :clear_cache do | |
| on roles(:web), in: :groups, limit: 3, wait: 10 do | |
| # Here we can do anything such as: | |
| # within release_path do | |
| # execute :rake, 'cache:clear' | |
| # end | |
| end | |
| end | |
| after :finishing, 'deploy:cleanup' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment