gallery-api/deploy.php

53 lines
1.1 KiB
PHP
Raw Normal View History

2017-07-21 19:59:16 +02:00
<?php
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('repository', 'gitosis@git.fixnet.hu:angullary.git');
set('shared_files', [
'vendor',
'data/galleries',
'config/autoload/local.php',
]);
task('npm:install', function () {
cd('{{release_path}}/module/AngularFrontend');
run('npm install || exit 0');
});
task('deploy:clean', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:symlink',
'cleanup',
]);
task('deploy', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:symlink',
'npm:install',
'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');
*/