Morning @flomo - so made some progress with this. Connection to the server works but then i get an error… Its a big ask but if you have a mo’ it’d very appreciated!
It has uploaded some files and created some directories. I’m uncertain about the paths used in the example. Namely deploy/ and current/. I’m presuming we can use the default public httpdocs?
In Client.php line 103:
The command "cd httpdocs && (mkdir httpdocs/releases/1)" failed.
Exit Code: 1 (General error)
Host Name: xxx.xxx.xxx.xxx
================
mkdir: cannot create directory `httpdocs/releases/1': No such file or directory
The domains’ public folder is httpdocs. Maybe there’s something wrong with the paths?
require 'recipe/common.php';
require 'vendor/florianmoser/plesk-deployer/recipe/chroot_fixes.php';
// plesk
// /var/www/vhosts/humanrelationsjournal.org/httpdocs/ (from test.php)
set('chroot_path_prefix', '/var/www/vhosts/humanrelationsjournal.org'); // checked & correct
set('chroot_index_file', 'httpdocs');
// host ? IP works, user correct. path - some files being uploaded [see grab]
host('xxx.xxx.xxx.xxx')
->user('xxxx')
->port('2020')
->set('deploy_path', 'httpdocs'); // tried /httpdocs & get different error.
dep LOG
[94.229.171.80] > echo $0
[94.229.171.80] < bash
[94.229.171.80] > if [ ! -d httpdocs ]; then mkdir -p httpdocs; fi
[94.229.171.80] > if [ ! -L httpdocs/current ] && [ -d httpdocs/current ]; then echo 'true'; fi
[94.229.171.80] > cd httpdocs && if [ ! -d .dep ]; then mkdir .dep; fi
[94.229.171.80] > cd httpdocs && if [ ! -d releases ]; then mkdir releases; fi
[94.229.171.80] > cd httpdocs && if [ ! -d shared ]; then mkdir shared; fi
[94.229.171.80] > if [ -f httpdocs/.dep/deploy.lock ]; then echo 'true'; fi
[94.229.171.80] > touch httpdocs/.dep/deploy.lock
[94.229.171.80] > cd httpdocs && (if [ -h release ]; then echo 'true'; fi)
[94.229.171.80] > cd httpdocs && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo 'true'; fi)
[94.229.171.80] > cd httpdocs && (if [ -d httpdocs/releases/1 ]; then echo 'true'; fi)
[94.229.171.80] > cd httpdocs && (date +"%Y%m%d%H%M%S")
[94.229.171.80] < 20190703095704
[94.229.171.80] > cd httpdocs && (echo '20190703095704,1' >> .dep/releases)
[94.229.171.80] > cd httpdocs && (mkdir httpdocs/releases/1)
[94.229.171.80] < [error] mkdir: cannot create directory `httpdocs/releases/1': No such file or directory
[Deployer\Exception\RuntimeException] The command "cd httpdocs && (mkdir httpdocs/releases/1)" failed.
Exit Code: 1 (General error)
It creates some of the folders and files but then fails when it tries to create something in releases/
I’ve tried adding a slash before or after the deploy_path (/httpdocs, or httpdocs/). But then i get a different error.
The command "if [ ! -d /httpdocs ]; then mkdir -p /httpdocs; fi" failed.
Any pointers appreciated!