* deployer added

* los basepath added
This commit is contained in:
Dávid Danyi
2017-09-15 13:26:47 +02:00
parent 863e6e502b
commit 7b83e4df9b
5 changed files with 115 additions and 2 deletions

58
deploy.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
namespace Deployer;
require 'recipe/common.php';
// Configuration
set('ssh_type', 'native');
set('ssh_multiplexing', true);
set('repository', 'https://gogs.ragnarok.yvan.hu/TSP/support-jira-graph.git');
set('shared_files', [
'config/autoload/local.php',
'config/autoload/los-basepath.local.php',
// 'config/autoload/doctrine.local.php',
]);
/*
set('shared_dirs', [
'data/persistent',
]);
*/
set('writable_dirs', []);
set('keep_releases', 3);
set('default_stage', 'production');
// Servers
host('vasgyuro.tsp')
->stage('production')
->user('edvidan')
->forwardAgent()
->set('php_service_name', 'php7.1-fpm')
->set('deploy_path', '/home/edvidan/applications/support-jira-graph');
desc('Reload PHP-FPM service');
task('php-fpm:reload', 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');
}); //->onlyOn('alfheim');
after('deploy:symlink', 'php-fpm:reload');
desc('Deploy your project');
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');