nystudio107 / craft-scripts

Shell scripts to manage database backups, asset backups, file permissions, asset syncing, cache clearing, and database syncing between Craft CMS environments
https://nystudio107.com/
MIT License
362 stars 61 forks source link

Support Local Asset Sync #41

Open mattclements opened 6 years ago

mattclements commented 6 years ago

Similar to REMOTE_DB_USING_SSH, offer the ability to locally sync assets such as when staging/live is on the same environment (i.e. without requiring SSH) via a new flag REMOTE_ASSETS_USING_SSH

khalwat commented 6 years ago

So this already works if staging and live are on the same server; the server just ssh's into itself.

The reason I kept it this way is to keep the code path pure/simple. I'll have a look at the PR tho.

mattclements commented 5 years ago

Thanks @khalwat - the issue is that a user needs to then copy their Public Key (for the web server user) into the same users authorized_keys to let this work. The pull request removes the requirement for this, which allows the scripts to be more easily adopted en-mass

terryupton commented 5 years ago

This is very useful for my setup @khalwat - is this something you are likely to merge?

khalwat commented 5 years ago

I want to have a good review of it, but I'm not opposed to the idea, as long as it isn't adding an additional code path (which it doesn't appear to be).