I’m new to roots.io and try to use it in our Shared Hosting Environment.
Our Hosting Environment is build with LiveConfig and I have SSH Access for Webhosting User and also root user.
In our Case the Webhosting Root folder ist /var/www/webXXX/htdocs
If I try to deploy it to Staging “./deploy.sh staging domain.tld” I got the following error message:
TASK [deploy : Run npm install] ************************************************
fatal: [XX.XX.XX.XX]: FAILED! => {“changed”: false, “cmd”: “npm install”, “failed”: true, “msg”: “[Errno 2] No such file or directory”, “rc”: 2}
By default, Trellis will not run npm install during a deployment, are you using the build-before tasks in deploy hooks? Is the path of the theme correct in there?
Yes this is normal (there should actually be 3 folders and a symlink in there).
Trellis does what is called an atomic deployment whereby the server will git clone the latest code to a temporary folder, run composer install to grab its dependencies, move all of this to a new timestamped folder in the releases folder and then symlink current to this release. This means that your webserver should be pointing to /srv/www/example.com/current/web as this will always be the latest code and the folder that current points to will be updated on each successful deployment.