在Openshift上部署Sails.js [英] Deploying Sails.js On Openshift

查看:94
本文介绍了在Openshift上部署Sails.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将 Sails.js 应用部署到 OpenShift 时,它会一遍又一遍地重启。

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

所以基本上我在 rhc tail 的输出相同的问题。 sails-js-on-openshift-app-restarting-over-over-over>问题和这个答案描述了为什么会出现此错误,但没有提供解决方案

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

有没有人成功将 Sails.js 应用程序部署到 OpenShift

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

我现在致力于OpenShift平台,但我真的想在下一个应用程序中使用SailsJS。

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

感谢您的任何建议。

推荐答案

为了在OpenShift上启动Sails,您需要设置您的 /config/local.js 中的端口主机配置键:

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

问题 / 答案你提到的是有效的; OpenShift上的主管实例似乎与Grunt有问题。快速解决方案是启动您的应用程序一次以构建 .tmp 目录,然后停止它并移动您的 Gruntfile.js 其他地方。然后你可以用 ctl_app start 启动你的应用程序,它应该没问题。在启动应用程序之前,您可能还需要 killall node ,以确保以前的尝试不会继续。

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.

这篇关于在Openshift上部署Sails.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆