<?php
namespace Deployer;
require 'recipe/laravel.php';
set('default_timeout', null); // because of long-running migrations
set('shared_dirs', [
'storage',
'uploads',
]);
host('<host>')
->setLabels([
'stage' => 'staging',
])
->setRemoteUser('<user>')
->setDeployPath('<path>');
task('deploy', [
'deploy:prepare',
'artisan:storage:link',
'artisan:optimize:clear', // clear all caches
'artisan:config:cache',
'artisan:route:cache',
'artisan:view:cache',
'artisan:event:cache',
'artisan:down',
'artisan:migrate',
'deploy:symlink',
'artisan:up',
'artisan:horizon:terminate',
'deploy:unlock',
'deploy:cleanup',
'deploy:success',
]);
after('deploy:failed', 'deploy:unlock');
deploy.php
Hello, I recently upgraded to Deployer 7 and I just encountered a long-running migration that caused the deploy to fail after 300 seconds, despite
default_timeoutbeing set tonull.This used to work in Deployer 6 so not too sure what's going on...
Upvote & Fund