I am using Trellis: 0.9.9
I’ve search these forums for the answer to my question, but whilst many touch upon a similar setup, I am reaching out to see if there’s an optimal way to achieve what I want using the Roots stack.
I have a WordPress site that will be load balanced, with likely two web servers and one remote database that’ll serve them. Nothing too crazy going on there, it all works fine.
The obvious concern is how to handle any plugin generated files that may appear in the /uploads/ directory, alongside whatever media is generated using the WP Dashboard. I will likely have frequent posts in the backend, with multiple media attached, so ideally I don’t want those files present on one of the servers, and not the other.
I understand that I could utilize a plugin to offload the media aspect to S3, or indeed create my own solution to do that, and while it’s a great option, I’m wondering if there’s something perhaps more native that can account for anything that hits the uploads folder.
This user has a somewhat similar setup to what I want, although I’m not too well versed in how I might ensure a valid cache between both web servers.
Anyway - I see NFS is mentioned, which will allow any files that are uploaded to one particular server instance to be instantly available to the others that have the NFS mounted, correct? This would work, I’d imagine, but is there a better way in true Trellis style
I notice the following in Trellis Deploy Roles:
project_shared_children: - path: web/app/uploads src: uploads
…but I can’t make 100% sense of it, or how it might apply to me.
Does Trellis account for this need of a shared upload folders across servers given that the uploads folder exists outside of the main site files?