0

My deploy approach may be noob. I'm using rsync and it works for the most part on many node.js website except with certain ones where there are build dependancies for xml. I supposed I could try Git but was concerned with having bloat on the VMs and wanted to keep as lean as possible.

Is there a better way to do this using rsync options or should I try an alternative deployment approach. rcpy seems bad.

OR if I must "npm rebuild" then what is the command to do this if I created it in a shell script to automate this in terms of chaining commands?

UPDATE:

Using this approach:

write a shell script to ssh to a remote machine and execute commands

with npm rebuild

Community
  • 1
  • 1
King Friday
  • 25,132
  • 12
  • 90
  • 84

1 Answers1

1

If you run exactly the same node.js version on exactly the same processor architecture, you don't need npm rebuild, since your binaries will work on the target without a change.

Otherwise there is no way to avoid it (except for removing binary dependencies entirely of course).

alex
  • 11,935
  • 3
  • 30
  • 42
  • Well in theory you can cross-compile to your target architecture and essentially run "npm rebuild" on your own computer instead of the servers. But I never did that. – alex Jan 31 '14 at 22:12
  • yah i didn't understand packages at all. I get it now. I don't have to check node_modules into github at all. doh! (Homer Simpson reference). – King Friday Apr 08 '14 at 00:05