I’m curious to know what should be included within the shared folder on the server after a deploy. The path is /srv/www/mydomain.com/shared
Inside there is the uploads folder - fine and fair enough, But I also have a source folder that includes .git, .gitignore, site, and trellis folders. Is this correct or should the contents of source be trimmed/ deleted/ ignored in someway?
Thanks in advance for any pointers.
someone correct me if I’m wrong but…:
No, your trellis stuff shouldn’t end up on your DO droplet.
When you do the Trellis deploy to DO, it asks you for a Git repository to use to make the deploy. This repo should contain your bedrock directory, which is basically the hosting directory for that site within your server. So when you go to /srv/www/mydomain.com, the only stuff in there should be Bedrock stuff.
When you do the Ansible provision command in Trellis, that provisions the server and it probably puts some Trellis-specific stuff on the server, but that’s a different process than the deploy.
Thanks for responding - I deleted the offending folders and after another deploy they are not there, so they must be added during provisioning.
I do have: project_unwanted_items: [’.git’, ‘site’, ‘trellis’, ‘Vagrantfile’] set in group_vars/all/main.yml but that didn’t seem to have the desired effect.
I’ll keep an eye on it for this and future projects.
in an ideal world Should the shared folder only contain /uploads
Looks like the new deploy role with Ansible 2 doesn’t support
project_unwanted_items so we’ll need to figure out a new solution
Sorry to reopen an old thread - but can’t seem to find anything else on here that relates to this issue.
I am also curious as to why when deploying (E.G. the example project) the deploy process copies the entire contents of the repo to /srv/www/wordpress_site/shared/source - including vault files etc.
Seems unnecessary and a possible security issue.
What is the thinking behind this? And, any ideas for working around this (E.G. using a hook to remove the dir after a deploy)?