recently sails have documented the way to host in openshift http://sailsjs.org/documentation/concepts/deployment/hosting as below
To deploy to OpenShift, you'll need to make some minor modifications to your configuration: Open up config/local.js in your app folder. In here, you'll need to add the following lines.
port: process.env.OPENSHIFT_NODEJS_PORT,
host: process.env.OPENSHIFT_NODEJS_IP,
You will also need to install grunt-cli with
npm i --save grunt-cli.
After doing that, create the file
.openshift/action_hooks/pre_start_nodejs with the following contents. (source)
#!/bin/bash
export NODE_ENV=production
if [ -f "${OPENSHIFT_REPO_DIR}"/Gruntfile.js ]; then
(cd "${OPENSHIFT_REPO_DIR}"; node_modules/grunt-cli/bin/grunt prod)
fi
Then create the file /supervisor_opts with the following contents. This tells OpenShift's supervisor to ignore Sails' .tmp directory for the hot reload functionality. (source)
-i .tmp
You can now git add . && git commit -a -m "your message" && git push to deploy to OpenShift.