1

I'm converting an EE site to Craft. During the conversion we are establishing LOCAL > DEV > LIVE environments and using GitHub.

LOCAL = My local MAMP PRO setup. 
DEV & LIVE = a single account at Arcustech.
    DEV = ~/www/dev_html/public
    LIVE = ~/www/public_html/public

The site currently has 354,000 images/thumbnail files in the /images directory. We'll eventually move images/assets to S3/Cloudfront, but for now/launch we're keeping them local.

Obviously I don't want to duplicate 354K images in the DEV directory, AND keep them sync'd, but want the DEV to correctly display images/assets for the client to see.

So I was thinking a /images symbolic link in DEV, pointing to /images in LIVE would maintain all the correct image/asset paths and display for the DEV site and Craft configs?

Does this make sense? Am I missing something or is there a better/easier/default way to do handle large numbers of images/assets across DEV & LIVE environments when they are on the same server/account?

1 Answer 1

2

Am I missing something or is there a better/easier/default way to do handle large numbers of images/assets across DEV & LIVE environments when they are on the same server/account?

Ideally you'd move them to a cloud-based solution (S3, etc.), but locally using a symlink is a perfectly fine option, too. Just make sure that Apache is configured to follow symlinks.

Wither either the symlink or cloud-based solution, just remember if you've got dev and live using their own databases and you perform an Asset operation on one (upload a file, delete a file, rename, etc.), then the other database will be out of sync and you'd need to run the "Update Asset Indexes" tool to pick up the change.

1
  • Excellent! Thanks again, @Brad! And yes, already tested Apache for follow symlinks. And yes, will be moving to S3 but want to make sure everything works locally with a few thousand images first. And yes, both LIVE and DEV have their own databases but client is not allowed to add Assets to the DEV site. It's only for previewing biz logic, functionality, design, and layout updates prior to pushing LIVE. Commented Oct 12, 2016 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.