Roots Discourse

Recommended Setup for Multiple Sites

Finally got a roots site (trellis, bedrock, and sage) working successfully on my local machine in ~/Sites/example.com/ which includes /trellis/ and /site/ and pushed to DO server.

But now trying to determine the best structure for future sites. For each new roots site, would I complete the same process such as:

~/Sites/example1.com/ [trellis] / [site]
~/Sites/example2.com/ [trellis] / [site]
~/Sites/example3.com/ [trellis] / [site]

Assuming this is the recommended option, but since that will create a separate virtual machine server for each site I would think that would end up taking up a lot of space once I have 50 or so, unless ubuntu/vagrant doesn’t take much space?

Initially I thought it should be:

~/Sites/trellis/[site1]
~/Sites/trellis/[site2]
~/Sites/trellis/[site3]

But that would require presumably all the sites to be deployed to the same server. And while many of the sites may go to the same staging server they would all be going to separate production servers so assume this isn’t the right option. But if there is a recommendation on using 1 trellis for all sites please share your thoughts. Just want to make sure I’m going down the right path before update my personal project sites to roots and future clients.

2 Likes

Just curious if you did a search for this topic on Discourse, as it’s already been discussed a few times.

Yes, I’ve been searching it extensively.

I founds results like: Best practice for Trellis with multiple sites however there question while at first glance looked similiar was about having sites that would all be subdomains and he was more asking if it was possible rather than which option is recommended.

And also saw Trellis setup for multiple Bedrock instances in subfolders but was also about havnig one domain with sub directories rather than completely seperate sites.

But if there is another thread where someone asked the recommended structure for multiple seperate sites and addresses the potential hard drive space issue of so many virtual servers, do let me know and I’ll take a look! I’ll keep searching in the meantime as well.

Here are a few more discourse links to consider.

Multiple sites in one Trellis, like you already considered.

Sounds like you want one Trellis, but each site on a separate server in production (adjust hosts/production as in “option 3” at link). If/when you want to limit server.yml to run on a given site/server, you can add the --limit site-1 option to your ansible-playbook command.

3 Likes

Hi @ChrisC, did you finally got how the setup for mutliple sites should be?

1 Like