Skip to content

Instantly share code, notes, and snippets.

@satchinjoshi
Created July 9, 2017 15:43
Show Gist options
  • Select an option

  • Save satchinjoshi/e5d87fbad79cf68b6b94f8fa26c794d5 to your computer and use it in GitHub Desktop.

Select an option

Save satchinjoshi/e5d87fbad79cf68b6b94f8fa26c794d5 to your computer and use it in GitHub Desktop.
cap tasks
# Devops commands
namespace :ops do
desc 'reload the nginx server'
task :reload_server do
on roles(:app) do
execute :sudo, :service, 'nginx reload'
end
end
desc 'reload php-fpm'
task :reload_phpfpm do
on roles(:app) do
execute :sudo, :service, 'php7.0-fpm reload'
end
end
desc 'Restart Queue'
task :queue_restart do
on roles (:app) do
within release_path do
execute :php , 'artisan', 'queue:restart'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment