* cleanup

This commit is contained in:
Danyi Dávid
2017-07-21 20:26:13 +02:00
parent 64bb788110
commit 23d72b566c
6 changed files with 33 additions and 119 deletions

View File

@@ -1,52 +1,47 @@
<?php
namespace Deployer;
require 'recipe/common.php';
server('prod', 'woody.fixnet.hu', 22)
->user('yvan')
->forwardAgent() // You can use identity key, ssh config, or username/password to auth on the server.
->stage('production')
->env('deploy_path', '/mnt/domains/yvan.hu/photos/api');
set('ssh_type', 'native');
set('ssh_multiplexing', true);
set('repository', 'gitosis@git.fixnet.hu:angullary.git');
set('shared_files', [
set('repository', 'ssh://gogs@gogs.ragnarok.yvan.hu:2206/yvan/gallery-api.git');
set('shared_dirs', [
'vendor',
'data/galleries',
'config/autoload/local.php',
]);
set('writable_dirs', []);
set('keep_releases', 3);
set('default_stage', 'production');
task('npm:install', function () {
cd('{{release_path}}/module/AngularFrontend');
run('npm install || exit 0');
server('prod', 'woody.fixnet.hu', 22)
->stage('production')
->user('yvan')
->forwardAgent()
->set('php_service_name', 'php7.1-fpm')
->set('deploy_path', '/mnt/domains/yvan.hu/photos/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');
});
task('deploy:clean', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:symlink',
'cleanup',
]);
//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',
'npm:install',
'deploy:unlock',
'cleanup',
]);
/*
task('php5-fpm:reload', function () {
run('sudo service php5-fpm reload');
});
after('deploy', 'php5-fpm:reload');
after('deploy:clean', 'php5-fpm:reload');
after('rollback', 'php5-fpm:reload');
*/
after('deploy', 'success');