You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I repeatedly encountered this error while running provision with deployer v7.4.0 on a clean Ubuntu 20.04 installation
> task provision:website
[beta.midhun.ca] ErrorException in website.php on line 26:
[beta.midhun.ca]
[beta.midhun.ca] file_get_contents(./Caddyfile): Failed to open stream: No such file or directory
[beta.midhun.ca]
ERROR: Task provision:website failed!
I managed to fix it by:
Adding _DIR_ to file reference resulting in file_get_contents(__DIR__ . '/Caddyfile')
> task provision:website
[beta.midhun.ca] error in website.php on line 17:
[beta.midhun.ca] run realpath /var/www/somehostname
[beta.midhun.ca] err realpath: /var/www/somehostname: No such file or directory
[beta.midhun.ca] exit code 1 (General error)
ERROR: Task provision:website failed!
Upon further testing, this happens when /var/www directory is not present.
So if the parent directory of the deploy_path is absent, this error occurs.
I moved set('deploy_path', run("realpath {{deploy_path}}")); after run("[ -d {{deploy_path}} ] || mkdir -p {{deploy_path}}"); to make sure realpath runs after creating the directory
It seems like code sequence got mixed up when looking at the source provision:website in recipe/provision/website.php.
These fixes the issues i had. I'm working on a PR.
I'm trying to provision a clean server in Hetzner Cloud (CCX13 - dedicated 2 vCPU 8GB RAM) with the Laravel recipe. I got an error; I tried several times with different PHP versions and removed and created the server.
The error is the following:
[servername] ErrorException in website.php on line 24:
[servername]
[servername] file_get_contents(./Caddyfile): Failed to open stream: No such file or directory
[servername]
ERROR: Task provision:website failed!
I repeatedly encountered this error while running provision with deployer v7.4.0 on a clean Ubuntu 20.04 installation
I managed to fix it by:
_DIR_
to file reference resulting infile_get_contents(__DIR__ . '/Caddyfile')
Caddyfile
to the buildThen i encountered another error:
This is where the error happened:
Upon further testing, this happens when
/var/www
directory is not present.So if the parent directory of the
deploy_path
is absent, this error occurs.I moved
set('deploy_path', run("realpath {{deploy_path}}"));
afterrun("[ -d {{deploy_path}} ] || mkdir -p {{deploy_path}}");
to make sure realpath runs after creating the directoryIt seems like code sequence got mixed up when looking at the source
provision:website
inrecipe/provision/website.php
.These fixes the issues i had. I'm working on a PR.
Discussed in #3821
Originally posted by mariomka April 23, 2024
I'm trying to provision a clean server in Hetzner Cloud (CCX13 - dedicated 2 vCPU 8GB RAM) with the Laravel recipe. I got an error; I tried several times with different PHP versions and removed and created the server.
The error is the following:
The
deploy.yaml
file:The text was updated successfully, but these errors were encountered: