deployer: Getting stuck on dep:prepare

Q A
Issue Type Question
Deployer Version 6.8.0
Local Machine OS macOS 11.1 (Desktop)
Remote Machine OS Ubuntu 20.04 (Server)

Description

I’m starting to play with deployer and wanted to see how it’s gonna work. Unfortunately it does not, getting stuck on “echo $0”.

I commented the after at the end to get the error before the error at the deploy:unlock task.

Content of deploy.php

I use standard recipe with following configuration

<?php

namespace Deployer;

require 'recipe/common.php';

set('application', 'Secrets');
set('repository', 'https://github.com/Luca-Castelnuovo/secrets.git');

set('git_tty', true);
set('allow_anonymous_stats', false);

host('REDACTED_IP_ADDR')
    ->stage('production')
    ->user('webserver')
    ->set('deploy_path', '~/test');

desc('Deploy your project');
task('deploy', [
    'deploy:info',
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:writable',
    'deploy:vendors',
    'deploy:clear_paths',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success',
]);

// after('deploy:failed', 'deploy:unlock');

Output log

Screenshot 2021-01-16 at 18 41 09-redacted_dot_app

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 34 (15 by maintainers)

Most upvoted comments

@Luca-Castelnuovo I think there are 2 different issues here:

  • your deploy.php shows user ‘webserver’ but your dep ssh -vvv test shows user ‘luca’ - if you log in with ‘ssh webserver@x.x.x.x’ does ~/test exist and is the shell bash?
  • the default deploy:unlock task needs to be modified so that the rm -f {{deploy_path}}/.dep/deploy.lock command is allowed to fail, in case the file was not created (in your case, it failed during deploy:prepare so the lock file perhaps did not exist)

I hope that helps.