From 4c0badd7bc20844af6d2aeb7554191e186b24ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danyi=20D=C3=A1vid?= Date: Wed, 25 Jul 2018 15:20:54 +0200 Subject: [PATCH] * deploy config added --- deploy.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 deploy.php diff --git a/deploy.php b/deploy.php new file mode 100644 index 0000000..fc43469 --- /dev/null +++ b/deploy.php @@ -0,0 +1,50 @@ +stage('production') + ->user('yvan') + ->forwardAgent() + ->set('php_service_name', 'php7.1-fpm') + ->set('deploy_path', '/mnt/apps/skies-proxy-api'); + +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 service {{php_service_name}} reload'); +}); +after('deploy:symlink', 'php-fpm:restart'); + +task('deploy', [ + 'deploy:prepare', + 'deploy:lock', + 'deploy:release', + 'deploy:update_code', + 'deploy:shared', + 'deploy:writable', + 'deploy:vendors', + 'deploy:clear_paths', + 'deploy:symlink', + 'deploy:unlock', + 'cleanup', +]); + +after('deploy', 'success');