Installing Node and Bower as part of the Trellis Deploy process

Is it possible to do this? It would make life simpler when using the whole Roots stack. Is this something that could be done with a variable or two in group_vars/production? It looks like there are some roles for these on Galaxy.

Have trellis install node via https://github.com/creationix/nvm

It’s what heroku does.

@romero2k Do you mean install Node and Bower on the local control machine or on the vagrant vm/remote host?

I haven’t done a ton with Node and Bower, so take this with a grain of salt.

If you intend to install Node and Bower on VM or remote host, these installs strike me more as one-time operations more suited to server.yml (or dev.yml) than deploy.yml. That said, you’ve probably seen that you can have the deploy run various “build” commands on the server (or on the local machine). You could then compile your project files on the server, but see this discussion on whether to compile theme files on the server or just compile locally and copy to server. Keep an eye out for improved deploy command hooks in the future.

1 Like

Also: http://austinpray.com/ops/2015/01/15/build-steps-and-deployment.html

1 Like