Best way to share Trellis (and Bedrock) configuration?

Hello, we are currently switching to Bedrock with Trellis, but we are looking for the best way to share Trellis and Bedrock configurations.

My first tough was creating a Trellis and a Bedrock repository modified with our configuration, but having to create repositories with very few differences from Roots’s ones seems a bit heavy.

I’m sure a lot of you have already figured out a nice way to share configuration between developers (and production of course), but I can’t find any guide about it.

What would be the best way to do it ?

We have figured this at the moment :
  • a app repo for the site/web/app/ folder
  • a configuration repo for trellis and bedrock configurations

To launch a development environment we should :

  1. Clone Roots’s repositories (Trellis and Bedrock).
  2. Change configurations with our configuration repo.
  3. vagrant up
  4. Clone our app repo.

Is this a good practice ? (We want also to use Trellis to deploy on DO)

Have you looked at the Roots example project?

This is the best way to work collaboratively on a Trellis site: the trellis and site directories are committed to GitHub (with encrypted vaults, see the docs for details) so that all configuration info and site code are in version control.

All that’s needed to share this config is to grant access to the GitHub repository and share the vault_pass. Anyone with access can clone the repository, put the vault password in place, and vagrant up to begin working.

Does that help?

1 Like

That’s seems pretty simple and efficient, the only bad point would be Trellis (and Bedrock) updates a bit harder to merge.

Worse would be if your team had out-of-sync versions of those two things. It’s slightly more complicated but definitely not impossible to update Trellis tracked by Git.

It’s absolutely the only method I’d recommend for working with Trellis as a team.

Also, for secure sharing of the .vault_pass between team members:

3 Likes

As an alternative. Lets see if we can make it work.
https://github.com/roots/trellis/issues/1501