我想使用Compose for Redis服务在Bluemix上部署NodeBB。我按照https://docs.nodebb.org/en/latest/installing/os/osx-mavericks.html上的设置说明操作
但是,当我将应用程序推送到Bluemix时,应用程序无法启动。我得到一个错误。请参考下面的链接。
Error on pushing nodeBB on Bluemix
不过,nodeBB应用程序在我本地的macbook上运行得很好。
如何解决这个error.Please让我知道如何在Bluemix上成功部署nodeBB?
发布于 2016-11-30 21:03:05
该错误指示在暂存的应用程序上找不到public/uploads/sound文件夹。它不会与其他应用程序文件一起被推送。
将以下行添加到其中
!/public
发布于 2016-11-30 21:20:13
以下错误可能会阻止nodeBB应用程序在Bluemix上运行。
1)如果Redis的撰写凭证设置不正确或Redis的撰写在Bluemix中不可用
为了正确设置Redis连接,在Bluemix中创建一个Compose For Redis服务。然后从服务凭证中复制Redis凭证,如下所示。
{
"db_type": "redis",
"name": "bmix_dal_yp_94747ceb_7c86_4319_b7be_88c2e9c829eb",
"uri_cli": "redis-cli -h sl-us-dal-9-portal.0.dblayer.com -p PORT -a PASSWORD”,
"deployment_id": "583e1bea52de460017000124",
"uri": "redis://admin: PASSWORD@sl-us-dal-9-portal.0.dblayer.com:PORT”
}
PORT represents Redis port number and PASSWORD represents Redis password在Unix或Mac上运行命令./nodebb config.json时,请使用凭据正确更新设置
确保Compose for Redis服务已启动并正在运行。否则,当您启动nodebb应用程序时,将会收到连接错误。
更新
nconf.set('port',urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR')?Nconf.get(nconf.get(‘PORT_ENV_VAR’):false) || 4567);
TOnconf.set('port',process.env.VCAP_APP_PORT || urlObject.port || nconf.get('port') || nconf.get('PORT') || (nconf.get('PORT_ENV_VAR') )?Nconf.get(nconf.get(‘PORT_ENV_VAR’):false) || 4567);
3)在将应用推送到Bluemix之前,请确保应用在本地机器上运行没有任何错误。命令:./nodebb start OR node app.js
可在此处的ttps://docs.nodebb.org/en/latest/installing/os/osx-mavericks.html中找到在本地设置和运行nodeBB的说明
https://stackoverflow.com/questions/40888736
复制相似问题