Deploying Sails.js On Openshift

假装没事ソ 提交于 2019-12-02 03:30:36

问题


When I deploy a Sails.js app to OpenShift it restarts over and over again.

So basically I am having the exact same problem with the same output from rhc tail described in this question and this answer describes why this error is occurring but there are no solutions offered

Has anyone successfully deployed a Sails.js app to OpenShift?

I am committed to the OpenShift platform at this point but really want to use SailsJS for my next app.

Thanks for any suggestions.


回答1:


In order to start Sails on OpenShift, you need to set the port and host config keys in your /config/local.js to:

port: process.env.OPENSHIFT_NODEJS_PORT || 8080,
host: process.env.OPENSHIFT_NODEJS_IP

The question / answer you referred to is valid; the supervisor instance on OpenShift does seem to have a problem with Grunt. The quick solution is to start your app once to get the .tmp directory built, then stop it and move your Gruntfile.js elsewhere. Then you can start your app with ctl_app start and it should do fine. You might also killall node before you start the app, just to make sure previous attempts aren't still going.



来源:https://stackoverflow.com/questions/22537123/deploying-sails-js-on-openshift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!