Quick deploys

I am trying to fins a way of deploying quickly without going through the whole procedure. What I really want to do is to pull the git repo to the staging server and nothing else. sometime I make a few style changes in my css files locally and need to send them to the staging server. git pull from the stage server doesn’t work so I assumed that I could do it with ansible tags. however, the git clone task doesn’t have any tags associated with it.

Is this just a speed issue?

How long does a deploy take?

its mostly a speed issue but also space, a new instance of the app is created every deploy which seems unnecessary if im making a few css colour changes. a deploy takes 10-15 minutes with composer taking the longest.

That’s a long time. How many plugins is composer pulling in?

Also while Trellis does make a whole copy of the deployed site, which does take up space, there’s a rolling limit (5 maybe?) of how many it keeps.

I use Trellis to manage about 30 sites, all on $5 Digital Ocean servers, and I haven’t had a space issue yet.

1 Like

around 25 plugins, using cheap aws servers. is there any way of avoiding the composer update task?

Not really; each deployment contains its own copies of all the plugins, so running composer update is necessary for a working site.

Still shouldn’t take 15 minutes. Are they all from wpackagist? Github has been having some issues the last couple of days, could that be slowing some of them down?

If the composer.lock file is commited to the repo, a simple composer install will speed up things quite a bit!

Where are you in the world?

Deploys typically took me ~10 minutes when I was in the US. Ever since I’ve been living in China, 10-15 minutes is if I get lucky. Sometimes I have to leave for the night and set it to run for hours to get it to deploy. So obviously location and internet speed plays a huge role.

Edit: Just finalized one in under 10 minutes, I guess it’s a good day :slight_smile:

part of the problem was that I had git packages that weren’t on toran or wpackagist. some were dev packages that I developed across projects so they had to stay, others i made private packages for served on toran proxy, some code i could put in the project repo, this helped speed up my deploys. hope this helps