* deploy config added
This commit is contained in:
parent
8c5b58acd1
commit
4c0badd7bc
50
deploy.php
Normal file
50
deploy.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Deployer;
|
||||
require 'recipe/common.php';
|
||||
|
||||
set('ssh_type', 'native');
|
||||
set('ssh_multiplexing', true);
|
||||
|
||||
set('repository', 'ssh://gogs@gogs.ragnarok.yvan.hu:2206/yvan/skies-api.git');
|
||||
set('shared_dirs', [
|
||||
'data/tmp',
|
||||
]);
|
||||
set('shared_files', [
|
||||
// 'config/autoload/doctrine.local.php',
|
||||
]);
|
||||
|
||||
set('writable_dirs', []);
|
||||
set('keep_releases', 3);
|
||||
set('default_stage', 'production');
|
||||
|
||||
host('alfheim.ragnarok.yvan.hu')
|
||||
->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');
|
||||
Loading…
x
Reference in New Issue
Block a user