mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Bugfix laravel recipe (#622)
* Fix laravel recipe * Changed order task deploy:shared and deploy:vendors in laravel recipe
This commit is contained in:
parent
4b48e5d69d
commit
4238fb0c5d
@ -9,13 +9,7 @@ require_once __DIR__ . '/common.php';
|
||||
// This recipe support Laravel 5.1+, with orther version, please see document https://github.com/deployphp/docs
|
||||
|
||||
// Laravel shared dirs
|
||||
set('shared_dirs', [
|
||||
'storage/app',
|
||||
'storage/framework/cache',
|
||||
'storage/framework/sessions',
|
||||
'storage/framework/views',
|
||||
'storage/logs',
|
||||
]);
|
||||
set('shared_dirs', ['storage']);
|
||||
|
||||
// Laravel 5 shared file
|
||||
set('shared_files', ['.env']);
|
||||
@ -23,6 +17,19 @@ set('shared_files', ['.env']);
|
||||
// Laravel writable dirs
|
||||
set('writable_dirs', ['bootstrap/cache', 'storage']);
|
||||
|
||||
/**
|
||||
* Helper tasks
|
||||
*/
|
||||
task('artisan:up', function () {
|
||||
$output = run('{{bin/php}} {{deploy_path}}/current/artisan up');
|
||||
writeln('<info>'.$output.'</info>');
|
||||
})->desc('Disable maintenance mode');
|
||||
|
||||
task('artisan:down', function () {
|
||||
$output = run('{{bin/php}} {{deploy_path}}/current/artisan down');
|
||||
writeln('<error>'.$output.'</error>');
|
||||
})->desc('Enable maintenance mode');
|
||||
|
||||
/**
|
||||
* Main task
|
||||
*/
|
||||
@ -30,23 +37,11 @@ task('deploy', [
|
||||
'deploy:prepare',
|
||||
'deploy:release',
|
||||
'deploy:update_code',
|
||||
'deploy:vendors',
|
||||
'deploy:shared',
|
||||
'deploy:vendors',
|
||||
'deploy:writable',
|
||||
'deploy:symlink',
|
||||
'cleanup',
|
||||
])->desc('Deploy your project');
|
||||
|
||||
after('deploy', 'success');
|
||||
|
||||
/**
|
||||
* Helper tasks
|
||||
*/
|
||||
task('deploy:up', function () {
|
||||
$output = run('php {{deploy_path}}/current/artisan up');
|
||||
writeln('<info>'.$output.'</info>');
|
||||
})->desc('Disable maintenance mode');
|
||||
|
||||
task('deploy:down', function () {
|
||||
$output = run('php {{deploy_path}}/current/artisan down');
|
||||
writeln('<error>'.$output.'</error>');
|
||||
})->desc('Enable maintenance mode');
|
||||
|
Loading…
x
Reference in New Issue
Block a user