This has been discussed a bit before, but resources in associated threads are a little light, so I thought I’d start a new topic.
- I have an existing Droplet/Trellis box with three Bedrock sites
- I have an old PHP site that runs on a similar (LAMP) stack on shared hosting. (It’s a ZenPhoto site–remember that?)
- I’d like to run that existing site on the same Droplet alongside my Bedrock sites
- Ideally, I’d like to automate setup and deployment of the existing non-Bedrock site using Ansible
So my question is: has anybody successfully extended Trellis for this use case? If so, care to share your Ansible configs? Is there an existing Ansible role that I can use to extend this one Trellis box?
Any beginner-friendly Ansible resources appreciated, as well! The official docs are a little intimidating.
I’ve set up Trellis to use Laravel. Never used ZenPhoto. But honestly, it’s not that hard when you jump in. The
wordpress-install roles are what you need to focus on. Copy and paste those. Basically just modify what you need - running composer, change the folder that nginx points to as the public folder, run any deploy commands you might need.
I just used the Ansible docs, googled what I didn’t know, and tweaked it until I got it going.
I would suggest working on a new Vagrant box and then spinning up a new droplet to test on until you get it right before trying it on the droplet you’ve been using.
That’s good to hear. Thanks for the tips. My goal is to be able to pass args to Ansible to run the separate roles that provision my other site, without having to create a separate repo for it. I’ll post here when I’ve got something working.
I’m also interested in this. It would be nice to have an instance of Pattern Lab on the same server as the staging website. Currently, we’re using use BitBucket as a static site server…