One DO droplet per trellis/bedrock project?

Hi there,

I am using trellis and bedrock for a while now.
My setup is as follows:

  • 1 droplet for staging sites
  • 1 droplet for production sites

Basically I have 1 trellis project, with all sites defined in the config under wordpress_sites .

Recently I came across the example project: https://github.com/roots/roots-example-project.com., which gave me the impression that preferably one should have a DO droplet for every site. Is that correct?

My impression is that the Roots example project is simple in order to be easy to understand, not necessarily to suggest a preference for a single site per droplet.

I’m guessing the potential use cases are too varied for a universal recommendation of one or many sites per droplet. I’d be interested in people’s thoughts on when to do a single site vs. when to do multiple sites.

You may have already seen the somewhat related discussion here, here, and here.

Trellis can be really flexible so it’s really up to you, but it depends on what and how you want to structure your projects/sites(high or small traffic)/clients/git repos - not in that particular order.

I haven’t found a solution yet as we need to take into consideration git projects/structure also. It’d be great if you would have 1 Trellis for all your local work/vagrant and have each bedrock as a git repo (i have it set up that way now) and just rocket the deployments from one Trellis. But it was just on 1 server, dunno if i can have more servers for 1 Trellis?

I think 1 trellis per client would work though as that would make more sense if you’d need to share the project with another dev or hand over the git once you don’t want to work with them anymore :smiley: But that way you’d have 5+ vagrant environment, dunno if that is a good practice?

Another thing to consider is how to update bedrock/trellis/sage? :smile: As a example I haven’t had a solution for using upsteam for Sage inside a Bedrock.

I’d suggest taking a pencil and doing some hierarchy/tree sketches until it makes sense.

1 Like

I saw one of the devs write that you could go something like this

rootfoldername/
±- ansible
±- example.dev
±- example2.dev
±- example645.dev

You get the idea, all those sites share the same one ansible folder if they are on the same server (I assume they need to be all headed to the same server), this lets you do it in a smart way it seems to me, why have more than one controller for only one server

I would like to use one server to host 5 or 6 staging sites for co-workers and clients to see - very low traffic and a DO droplet lowest tier should be just fine, maybe a shared DB.

Anyone worked out how to do this?

In terms of production it would be sensible to leave 1 project per DO droplet I think?

I know I’m resurrecting the dead, but how do we solve for main.yml when doing multiple sites with one trellis folder?