Roots Discourse

Project Bonsai: One command to deploy Roots

Hey guys,

Covid had me bored thinking of how I would improve my processes. This led to creating Project Bonsai. It’s basically a full Roots stack with everything configured how I like it.

The cool thing is that I made some shell scripts that will launch this exact site in one command (development.sh, staging.sh, and production.sh).

The scripts use WP-CLI to create of all the pages, posts, forms and WP settings.

Then the only thing left to do to have this exact website is to go into your WP Dashboard > Forms and setup GravityForm notifications (currently not doable from GF-CLI as far as I know).

I don’t think this project is necessarily useful to many people in the Roots community yet, but perhaps you’ll find my process interesting. It is a work in progress, so I would love any feedback, criticism, ideas, or questions.

Tutorial videos:

Github

Scripts:

I’m pretty new to writing scripts and using WP-CLI, so if anyone wants to make any optimizations or improvements, feel free to make a pull request.

LEEF Design System: This is a SCSS folder you can drop into Sage that will build on top of Bootstrap to customize Bonsai’s look

Much love.

6 Likes

interesting, I’ll have a look… github links go to 404 page though :frowning:

Thanks for the heads up. Repo got switched to private for some reason. It should work now. :ok_hand:

Damn. That’s super cool. Perhaps a bit too opinionated for someone with a lot of existing Roots projects but that’s a smart config.

1 Like

Yeah I totally agree, which is why I said it’s probably not useful to many Roots users yet. Especially given that I’m including DigitalOcean, Bootstrap, Gravity Forms, Github, etc. This is mostly to streamline my current setup.

Maybe down the road I will have different configurations that match up to tutorials/guides.

But I think the most Roots users will get out of this for now is perhaps the scripts. Copy pasting them, then customizing to your liking. I wanted to get the scripts to the point where I could just run them over and over and over, and it always comes out with the same result. I’m planning to start experimenting more with WP-CLI and API to see how crazy it can get. :smile:

1 Like