I'd add this on the host definition
host('stagin.example.com')
->stage(STAGE_STAGING)
->set('repository', 'repository1');
host('prod.example.com')
->stage(STAGE_PRODUCTION)
->set('repository', 'repository2');
unless, of course, you are deploying to the same host, which I don't know why you would ..
~/.ssh/config
file and use ssh keys. Once this has been done, so that from the command line you can type ssh Host
and be sitting at a command prompt of the machine to deploy to, you should be ready to go. Note in ~/.ssh/config
on the Host line you can specify one or more names that you can use to ssh in. Host is different than HostName in ~/.ssh/config
. For the jump host setup look at the ProxyJump and ProxyCommand lines. Depending on the versions of Open ssh you may or may not be able to use ProxyJump. If not use ProxyCommand and netcat
. Something like this: ProxyCommand ssh hostnameoripaddress netcat -w 120 %h %p
.
Hello everyone, help solve the problem.
My server doesn't update paths for a long time
"\/var\/www\/user\/data\/www\/site\/backend\/releases\/11\/app\/Http\/Controllers"
"\/var\/www\/user\/data\/www\/site\/backend\/current" => "\/var\/www\/user\/data\/www\/site\/backend\/releases\/16\/app\/Http\/Controllers"
@hershkoy change this
set('composer', 'php -d memory_limit=-1 /usr/local/bin/composer');
to this
set('bin/composer', 'php -d memory_limit=-1 /usr/local/bin/composer');
In Process.php line 1203:
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "ssh -A -o ControlMaster=auto -o ControlPersist=60 -o ControlPath=/home/ubuntu/.ssh/deployer_root@123.456.234.123:2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@123.456.234.123 'bash -s; printf "[exit_code:%s]" $?;'" exceeded the timeout of 300 seconds.
COMPOSER_PROCESS_TIMEOUT=600
set('default_timeout', 1500);
@X-Tender for the custom file I'd try debugging this portion of the code https://github.com/deployphp/deployer/blob/master/bin/dep#L38 .. tbh I'm not sure how it works without trying to run it myself, but I don't have a project with the lastest deployer on hand, so can't test myself ..
When I run it localy on my mac it works via --file undo.php or --file "undo.php" but not in the gitlab env.