I’ve posted this a few times, then deleted, as I thought I’d fixed it - only to find I hadn’t.
I’m trying to set up a totally remote dev server, still using Trellis, as a replacement for my local machine.
I’ve tried a number of approaches - first duplicating the staging set up and server.yml as a dev server, then using the dev.yml with some modifications. The nearest I’ve got is using the dev.yml with a few tweaks - mainly removing mailpit, setting permissions, etc - which worked find until I added in sage, and until it started getting lost finding releases.
I’m trying to waste people’s time and ask questions until I’ve exhausted possibilities; I feel like it’s a lot easier than I’m making it out to be - I should be able to set up a DO server and run the dev env directly on it - but I also think I’ve ended up going blind to it a bit.
If anyone has any pointers, I’d really appreciate it.
thanks
Rob
Ok a little bit more on this; I think the issue I have, or at least the current one, is that when development is provisioned on the VM it uses the ‘current’ directory, however when I’m provisioning the server without the VM it’s using ‘site’. I can override that on the local set up using ‘current_path’, but that then seems to break deploys to staging.
Nearly there. Everything works until I add sage and use sync.sh to sync databases, then on loading the site I get the following:
Error locating autoloader. Please run composer install.
Any suggestions gratefully received.
I seem to have it working, though I think it’s probably a bit of a botch job here and there.
Just for info:
I set up users, ssh keys, etc on the remote dev server, and changed the IP in hosts to the server IP.
Removed mailpit as not needed.
Added current_path: site
to both sets of group_vars
Ran trellis provision development
, worked fine.
Provision and deployment of staging worked.
Added Sage - fine on dev. Pushed to staging and got this error:
Error locating autoloader. Please run composer install.
Ran composer install
in the appropriate place on the staging server and everything now ok.
Like I say, probably not the correct way of doing it, but it seems to work for now.
1 Like