Workflow talk : Vagrant vs Lando + Sage 9 + Trellis for deployment

Hi,

Just curious to see if anyone figured a way to work with Lando and deploy your Bedrock + Sage website with trellis so far. I’m planning to switch my entire workflow to Lando because I love the flexibility and ease of use of a Docker container. I know some people use the Pantheon recipe which look like a good workflow for deployment. I would prefer having a solution made on a server we can manage. Any thought? What is your favorite workflow so far? Do you guys still prefer vagrant?

Good questions. I’m trying to get out of Vagrant locally. Virtual machines consume a lot of resources from my machine and makes my coding time slower.

So far I’ve been trying to use https://github.com/danielroe/trellis-valet-driver and enveigle to reproduce a similar local environment as I was working before (with trellis and site folders on the root). I still need to automate the DB creation process but I’m fine with it, up to now.

I still rely on trellis for staging/productions server creation and deployments.

4 Likes

This is the exact workflow we use here at Itineris with our enveigle tool. Would recommend it :slight_smile:

1 Like

Using Lando is great for development, but if I was deploying to a Trellis provisioned server, I’d still like to test on Trellis in development since the development box is the closest to production you can test on outside of a staging server. Consequently, I still use Trellis (Vagrant) for development as well, since I usually don’t have more than one site on the go at a time — one Vagrant box isn’t gonna eat up too much of my HDD/RAM. Lando is great for revisiting a site if I need to run updates or small modifications or just try an idea without needing to create a new Vagrant box.

You should check out @kellymears’ / Tiny Pixel Collective’s traefik-ify project. It aims to provide the same thing that Lando does, except specifically for a Trellis project. I think over time the Docker image included will look more and more like Trellis (PRs accepted :+1:).

1 Like

@knowler, what is performance like with a Traefik (or Lando for that matter) Bedrock setup on a Mac, compared to Vagrant on a Mac?

The last time I tried a Bedrock Docker setup on my Mac, it was quite slow. The only solution to this problem seems to be a file sync tool like Docker Sync: http://docker-sync.io/

Check out GitHub - aaemnnosttv/wp-cli-valet-command: Harness the power of Laravel Valet for creating fully functional WordPress installs in seconds.

1 Like

Definitely, @ng3. Thanks!

How would you stay with the typical Roots’ project structure if you use this package? I’d like to continue using trellis for deployments and server creation. Do you think that could be possible?

- project
-- trellis
-- site

Any idea?

Off the top of my head (I haven’t used it for a while):
You can do wp valet new <name> --project=bedrock to get a Bedrock set up, then just add the Trellis folder.

I see. I guess structure could be

- project-with-tld
-- trellis
-- project

And you will have to update some of trellis default settings. Will keep investigating. Thanks!

I’ll double check next time I get a sec, but I’m pretty sure you don’t need that nesting - all my projects are

- domain.tld
-- site
-- trellis

If you’re using valet I think you need to leave the tld out of the directory name as unless you want the dev url to be domain.tld.test. The tld can be changed in valet settings though.

I haven’t used Lando/Traefik enough to give a fair assessment, however, when I have used it (or Docker in general), the slow file syncing has been noticeable and at least for now it doesn’t seem like it will be improving, however, at least it’s on the their team’s radar. When I have time in the future I’d love to try and find some solutions. For now, I use Lando/Docker for quick changes or testing. For active development, Trellis/Vagrant still takes the cake since it is the closest production-parity-wise. Of course, the file syncing is also not as great as using a local tool like Valet/MAMP, but I personally don’t want to live with the headache of using a shared DB/config for development.

1 Like