* initial commit
This commit is contained in:
62
deploy.php
Normal file
62
deploy.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
namespace Deployer;
|
||||
require 'recipe/common.php';
|
||||
|
||||
set('ssh_type', 'native');
|
||||
set('ssh_multiplexing', true);
|
||||
|
||||
// Configuration
|
||||
|
||||
set('repository', 'ssh://gogs@gogs.ragnarok.yvan.hu:2206/Laterex/webnaplo-gul-api.git');
|
||||
set('shared_files', [
|
||||
'config/autoload/local.php',
|
||||
'config/autoload/doctrine.local.php',
|
||||
'config/autoload/mail.local.php',
|
||||
]);
|
||||
set('shared_dirs', [
|
||||
'data/attachments',
|
||||
'data/log',
|
||||
'data/tmp',
|
||||
'data/user-upload',
|
||||
]);
|
||||
set('writable_dirs', []);
|
||||
set('keep_releases', 3);
|
||||
set('default_stage', 'production');
|
||||
|
||||
// Servers
|
||||
|
||||
host('lxuz.hu')
|
||||
->stage('production')
|
||||
->user('latuzcs_beik_api_access')
|
||||
->forwardAgent()
|
||||
->set('bin/php', '/usr/bin/php7.1')
|
||||
->set('bin/composer', '{{bin/php}} /var/www/clients/client5/web20/bin/composer')
|
||||
->set('php_service_name', 'php7.1-fpm')
|
||||
->set('deploy_path', '/var/www/clients/client5/web20/deploy');
|
||||
|
||||
// Tasks
|
||||
|
||||
desc('Restart 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');
|
||||
});
|
||||
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');
|
||||
Reference in New Issue
Block a user