How to tell openshift to do npm install to update a package and restart the app?

I have a node.js app on openshift and a package that it uses which I update frequently. So I also put "mypackage":"latest" in the packages.json for that reason.

I want to tell openshift to update that package and restart the app.

rhc app restart just restarts the app without doing npm install

Is there any way to do that?

(Other than unnecessarily updating app's code and pushing the changes, which is plan B)

I see two ways to achieve this:

  • place a force_clean_build marker - this is not the best way because it can take a lot of time to re-download all the dependencies but definitely works
  • create a build or deploy action hook and force update the dependency with npm