deployer: Deployment Script suddenly failing with "a terminal is required to read the password"
- Deployer version: v7.0.0-rc.4
- Deployment OS: Ubuntu 21.10 deploying to 20.04
Just run the php-fpm:reload
task.
err sudo: a terminal is required to read the password; either use the -S option to read from
standard input or configure an askpass helper
deploy.php
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'contrib/php-fpm.php';
require 'contrib/npm.php';
/************************************************************************
* Config
************************************************************************/
set('application', 'Funeral Stream');
//set('deploy_path', '~/{{application}}');
set('repository', 'git@bitbucket.org:webfoxDev/funeral.stream.app.git');
set('php_fpm_version', '8.0');
add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', []);
/************************************************************************
* Hosts
************************************************************************/
host('production')
->setHostname('app.redacted.stream')
->setRemoteUser('forge')
->setDeployPath('/home/forge/app.redacted.stream')
->set('branch', 'master');
// host('staging')...
/************************************************************************
* Tasks
************************************************************************/
desc('Deploy the project');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'deploy:assets',
'artisan:storage:link',
'artisan:view:cache',
'artisan:config:cache',
'artisan:down',
'artisan:migrate',
'deploy:publish',
'php-fpm:reload',
'artisan:api:stripe-sync-prices',
'artisan:up',
'artisan:horizon:terminate',
]);
desc('Deploy local frontend assets');
task('deploy:assets', function () {
runLocally('npm run prod');
runLocally('npm run prod:embed');
upload('./public/build/', '{{release_or_current_path}}/public/build', ['progress_bar' => false]);
upload('./public/embed/', '{{release_or_current_path}}/public/embed', ['progress_bar' => false]);
});
desc('Terminate Horizon');
task('artisan:horizon:terminate', artisan('horizon:terminate'))
->select('production');
desc('Sync Stripe Prices');
task('artisan:api:stripe-sync-prices', artisan('api:stripe-sync-prices'));
desc('Reload FPM PHP');
task('php-fpm:reload', fn() => run('{{php_fpm_command}}'))
->select('production');
/************************************************************************
* Hooks
************************************************************************/
after('deploy:failed', 'deploy:unlock');
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (10 by maintainers)
Fixed in 2fb0129a981edce4a0064efe4688a7e987fb3e74
@antonmedv, I found a solution to the problem.
Logs
7.0.0-rc.3 -
php-fpm:reload
is ok7.0.0-rc.4 -
php-fpm:reload
is faileddeploy.php
7.0.0-rc.3
7.0.0-rc.4
And if I run these commands manually:
Bads: