Handling composer vendor-expose without composer/ssh

Silverstripe Version:

This pertains to setup without shell access.
Am wondering what would be the best practice for handling vendor-expose of resources in 4.1, with the new public/resources/ folder in 4.1
With composer, the exposed folders are symlinked in there, but without composer/ssh access, that leaves the workaround of having to duplicate the exposed resources by making a copy into the public/resources folder.

I would imagine this will make pushing changes quite tedious.

1 Like

If you run composer vendor-expose copy on your local environment (where I assume you do have composer), does that create the real files in the right place for your production environment?

If so, then you should be able to keep everything in sync / updated with composer and still deploy with SFTP or similar. Maybe :face_with_raised_eyebrow:

(if it works, then you should be able to add SS_VENDOR_METHOD=copy in your .env so it copies by default)


You could run vendor expose with the copy command, so the files are copied instead of symlinked and then upload them.

Also, just FTP upload is a bit a dangerous thing to have. You might want to look in to solutions like FTPLoy, so your deployment process is handled as if it was git. I do believe those kind of services often support running composer commands as well, before actively uploading.

Noted and tks for the suggestions.
FTPloy definitely looks like a good tool to use!