user('mydentalbackup') ->identityFile('~/.ssh/id_mshillam.pub') ->set('deploy_path', 'domains/panel.mydentalbackup.co.uk/public_html') ->pty(true); // Tasks desc('Restart PHP-FPM service'); task('php-fpm:restart', function () { // The user must have rights for restart service // /etc/sudoers: username ALL=NOPASSWD:/bin/systemctl restart php-fpm.service // run('sudo systemctl restart php-fpm.service'); }); after('deploy:symlink', 'php-fpm:restart'); // [Optional] if deploy fails automatically unlock. after('deploy:failed', 'deploy:unlock'); // Migrate database before symlink new release. before('deploy:symlink', 'artisan:migrate');