{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/strong-pm/issues/208","labels_url":"https://api.github.com/repos/strongloop/strong-pm/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/strong-pm/issues/208/comments","events_url":"https://api.github.com/repos/strongloop/strong-pm/issues/208/events","html_url":"https://github.com/strongloop/strong-pm/issues/208","id":77662248,"number":208,"title":"Option to disable `npm rebuild` at deploy time","user":{"login":"javefang","id":1200580,"avatar_url":"https://avatars.githubusercontent.com/u/1200580?v=3","gravatar_id":"","url":"https://api.github.com/users/javefang","html_url":"https://github.com/javefang","followers_url":"https://api.github.com/users/javefang/followers","following_url":"https://api.github.com/users/javefang/following{/other_user}","gists_url":"https://api.github.com/users/javefang/gists{/gist_id}","starred_url":"https://api.github.com/users/javefang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javefang/subscriptions","organizations_url":"https://api.github.com/users/javefang/orgs","repos_url":"https://api.github.com/users/javefang/repos","events_url":"https://api.github.com/users/javefang/events{/privacy}","received_events_url":"https://api.github.com/users/javefang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/strong-pm/labels/%23verify","name":"#verify","color":"ededed"},{"url":"https://api.github.com/repos/strongloop/strong-pm/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"rmg","id":17978,"avatar_url":"https://avatars.githubusercontent.com/u/17978?v=3","gravatar_id":"","url":"https://api.github.com/users/rmg","html_url":"https://github.com/rmg","followers_url":"https://api.github.com/users/rmg/followers","following_url":"https://api.github.com/users/rmg/following{/other_user}","gists_url":"https://api.github.com/users/rmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmg/subscriptions","organizations_url":"https://api.github.com/users/rmg/orgs","repos_url":"https://api.github.com/users/rmg/repos","events_url":"https://api.github.com/users/rmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmg/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-05-18T13:44:28Z","updated_at":"2015-12-13T04:09:39Z","closed_at":null,"body":"OS: RHEL 6.6\r\nnode.js: 0.10.36\r\nstrong-pm: 4.1.0\r\n\r\nI noticed that strong-pm always try to run `npm rebuild` and `npm install --production` at deploy time.\r\nhttps://github.com/strongloop/strong-pm/blob/master/LIFE-CYCLE.md\r\n\r\nThe `npm install --production` is fine, as all non dev dependencies are declared as `bundledDependencies` in package.json. But `npm rebuild` is problematic when some package has native binaries (e.g. ldapjs), as it will trigger a `node-gyp rebuild` on the deployment target.\r\n\r\nThis might be a problem with our company's policy. We have to build all deployment packages on a dedicated build server (Linux), including download all dependencies, build all native binaries and pack them up as tar balls. Then deploy the tar balls to production servers (Linux). The production servers don't have Internet access, and no compilation should be performed on the production server. (i.e. it should just unpack the tar ball and run them.) Currently strong-pm calls rebuild regardless on the production server, which is stopping us from using it as process manager.\r\n\r\nWe always run `slc build --npm --scripts` on the build server so it will run all the install scripts to compile native binaries and include them in the deployment tar balls. Our build servers always have the same process architecture, OS and node version as the production server so in fact no rebuild is required. \r\n\r\nIs it possible to add an option to switch on/off the rebuild behaviour? Actually I think the default behaviour might better to be \"do not rebuild\" when deploying. \r\n\r\nTo enable rebuild for a deploy:\r\n`slc deploy  --rebuild -s <service> <url> <package>`\r\n\r\nTo disable rebuild for a deploy:\r\n`slc deploy -s <service> <url> <package>`\r\n\r\nThanks in advance!\r\nJave"},"comment":{"url":"https://api.github.com/repos/strongloop/strong-pm/issues/comments/164220916","html_url":"https://github.com/strongloop/strong-pm/issues/208#issuecomment-164220916","issue_url":"https://api.github.com/repos/strongloop/strong-pm/issues/208","id":164220916,"user":{"login":"rmg","id":17978,"avatar_url":"https://avatars.githubusercontent.com/u/17978?v=3","gravatar_id":"","url":"https://api.github.com/users/rmg","html_url":"https://github.com/rmg","followers_url":"https://api.github.com/users/rmg/followers","following_url":"https://api.github.com/users/rmg/following{/other_user}","gists_url":"https://api.github.com/users/rmg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmg/subscriptions","organizations_url":"https://api.github.com/users/rmg/orgs","repos_url":"https://api.github.com/users/rmg/repos","events_url":"https://api.github.com/users/rmg/events{/privacy}","received_events_url":"https://api.github.com/users/rmg/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T04:09:39Z","updated_at":"2015-12-13T04:09:39Z","body":"Once #297 has been verified and passes our QA/QE, we should be able to release strong-pm v5.1.0 with a new `--skip-defaul-install` option that should solve this problem."}}