简体   繁体   English

如何在openshift上为我现有的应用程序升级NodeJS?

[英]How to upgrade NodeJS for my existing application on openshift?

I have an application running on OpenShift using NodeJS 0.10 but now I want to upgrade it to latest 0.12. 我有一个使用NodeJS 0.10在OpenShift上运行的应用程序,但现在我想将它升级到最新的0.12。 I added to package.json : 我添加到package.json

  "engines": {
    "node": ">= 0.12.0",
    "npm": ">= 1.0.0"
  },

I also followed https://blog.openshift.com/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style/ and got NODEJS_VERSION marker in .openshift folder. 我还关注了https://blog.openshift.com/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style/并在.openshift文件夹中获得了NODEJS_VERSION标记。

I stopped app, started again but cant get it to run NodeJS 0.12. 我停止了app,再次启动,但无法运行NodeJS 0.12。 I tried to remove NodeJS cartridge but I get 'nodejs-0.10' cannot be removed message. 我试图删除NodeJS墨盒,但我得到'nodejs-0.10'无法删除消息。 I also follwed accepted answer OpenShift not working with certain Nodejs dependencies (Koa) but when I get to openshift page it seems that I can only deploy new application but I just need to upgrade existing app. 我也接受了接受的答案OpenShift没有使用某些Nodejs依赖项(Koa)但是当我进入openshift页面时,似乎我只能部署新的应用程序,但我只需要升级现有的应用程序。

Is there any way to upgrade existing app nodeJs version on openshift? 有没有办法在openshift上升级现有的app nodeJs版本?

Just to say that OpenShift is updating to NodeJS 5.10. 只是说OpenShift正在更新到NodeJS 5.10。 I didn't find documentation about that, but I have created an application few days ago and a new option is showing up when selecting the cartridge to use. 我没有找到相关的文档,但我几天前创建了一个应用程序,并且在选择要使用的盒式磁带时会出现一个新选项。 I can see both options: 我可以看到两个选项:

Node.js 0.10 (first option) Node.js 0.10 (第一个选项)

Node.js (Latest) (last option) Node.js(最新) (最后一个选项)

Openshift  - 选择墨盒

Openshift  - 规格

Maybe it's a good idea to test it! 也许测试一下是个好主意!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM