shipitjs / shipit-deploy

Set of deployment tasks for Shipit based on git and rsync commands.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build on remote

p3drosola opened this issue · comments

I'm testing shipit-deploy and from what I can see the deploy:init and deploy:fetch steps are run on the local machine.

It seems to me it'd make a lot more sense to run these on the remote server, so that you ensure consistently reproducible builds, regardless of where you're deploying from.

Am I missing something?

If you have several server running code into production, it's not a good idea to burn CPU on the remote server, you will make your application lag during the deployment.

Hello, I think it is a great idea to have at least the possibility (as an option ?) to do everything remotely.
The issue to burn CPU is something that the programmer should have in mind but could do anyway. As said by @p3drosola, the builds may not be consistent, and another problem is with the connection : fetching a big repository on a web server is quick, but doing so from my home is slow, and uploading the built directory to the web server even slower.

Or maybe I am just missing something @neoziro , as it is written in the description that the project can be built remotely ?

As it currently stands, shipit-deploy assumes fetching and (probably building) on the local machine.

Nothing in shipit dictates this of course. I would encourage you to fork shipit-deploy to fetch remotely (similar to Capistrano). In a next major version of shipit-deploy, this integration could be considered.

The project could of course still be built remotely, by running shipit.remote commands on the updated event. (npm install, gulp build, etc)

@timkelty Ok I see. Thank you.
I will do a proper PR when the changes are final on my side.