I’m creating a new Trellis project for my own website. In this project, I’d like to have the possibility of adding temporary staging environments for various bedrock-projects, as subdomains of my own domain. Thus, instead of the standard folder structure suggested in https://github.com/roots/roots-example-project.com, mine will look something like this:
/ - ansible - my-site - client1-staging - client2-staging
and so on.
In my group_vars, should I define subtree for each of the wordpress_sites as “my-site”, “client1-staging”, and so on, i.e. the name of the folder containing the bedrock installation of each site?
wordpress_sites: my-site: site_hosts: - staging.mysite.com local_path: '../my-site' # path targeting local Bedrock site directory (relative to Ansible root) repo: firstname.lastname@example.org:user/my-site.git subtree: my-site [...] client1: site_hosts: - client1-staging.mysite.com local_path: '../client1-staging' # path targeting local Bedrock site directory (relative to Ansible root) repo: email@example.com:user/client-1.git subtree: client1-staging [...]
Ideally, I’d like to track these projects as separate git repositories, with their own respective upstreams, i.e. the trellis repo for the ansible folder, bedrock for each of the sites and sage for the theme of each site. How would I go about doing this? I’ve initialized my own repos for each of the bedrock sites already, as this is necessary for the ansible deploys to work. But this leaves the ansible folder untracked. Should I set up another repo in the project root with everything other than /ansible in .gitignore (i.e all of the sites and .vagrant)?
Each time I add another temporary staging site for a client by cloning bedrock, I’d have to re-provision my vagrant box, correct? Is there a way of adding a site to the box without deleting the data of existing sites?