Sails.js git auto deploy tutorial

169 views
Skip to first unread message

Dave Chenell

unread,
Feb 17, 2014, 7:52:30 PM2/17/14
to sai...@googlegroups.com
Hey everyone,

I made a quick Sails.js tutorial about how to auto deploy your sails project on git push using forever and git POST hooks.


I would love to hear what you guys think about this approach and also how everyone else is handling deployment.


Dave


Ambroise Dhenain

unread,
Feb 18, 2014, 1:45:39 AM2/18/14
to Dave Chenell, sai...@googlegroups.com
To avoid to refresh the server each time you push, I suggest to use branches and to use this behaviour only with the master or production branches, with bitbucket you can restrict push on some branches, then you just have to make Pull Request to update your branch used in production. Doing this way, You'll be able to control the push that will restart the server.and avoid "shitty" push.

I think that can be a good way to do it in some projects, but for instance you are overrwriting all source code on poduction, by doing a git resert --hard, this cannot be done on some projects where the production server generates files or things that need to be saved on git, not erased.

But otherwise I think that's not a bad way!
--
Cordialement,

M. Ambroise Dhenain.
Reply all
Reply to author
Forward
0 new messages