Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
deployer laravel recipe
require 'recipe/common.php';
// Laravel shared dirs
set('shared_dirs', [
// Laravel 5 shared file
set('shared_files', ['.env']); // 初回時どうしようかと迷う。デプロイサーバーからアップロードでも良いかもしれない
// Laravel writable dirs
set('writable_dirs', ['storage', 'vendor']);
* tasks
// migrate
task('database:migrate', function () {
run('php {{release_path}}/' . 'artisan migrate');
})->desc('Migrate database');
// optimize
task('deploy:optimize', function () {
run('php {{release_path}}/' . 'artisan optimize');
run('php {{release_path}}/' . 'artisan route:cache');
run('php {{release_path}}/' . 'artisan config:cache');
})->desc('Optimize Application');
* Main task
task('deploy', [
])->desc('Deploy your project');
after('deploy', 'success');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment