在Openshift中部署MEAN.JS [英] deploy MEAN.JS in Openshift

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

问题描述

尝试使用以下命令从github部署我的项目MEAN.JS,但不起作用.

try deploy my project MEAN.JS from github with the following command but does not work.

我到处搜索,没有发现问题所在

I searched everywhere and have not found it to be the problem

否则将在OpenShift上部署MEAN.JS应用程序

or that otherwise there is to deploy a MEAN.JS application on OpenShift

rhc应用程序创建趋势媒体nodejs-0.10 mongodb-2.4 --env NODE_ENV = production --from-code https://github.com/meanjs/mean .git --trace

rhc app create trendmedia nodejs-0.10 mongodb-2.4 --env NODE_ENV=production --from-code https://github.com/meanjs/mean .git --trace

    Application Options
    -------------------
    Domain:                meanopen
Cartridges:            nodejs-0.10, mongodb-2.4
Source Code:           https://github.com/meanjs/mean.git
Gear Size:             default
Scaling:               no
Environment Variables: NODE_ENV=production

Creating application 'trendmedia' ... C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.
34.2/lib/rhc/rest/client.rb:770:in `handle_error!': The initial build for the ap
plication failed: Shell command '/sbin/runuser -s /bin/sh 54f5215dfcf93302a10001
8e -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c3,c770' /bin/
sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an e
rror. rc=255 (RHC::Rest::ValidationException)

.Last 10 kB of build output:
zee/node_modules/es6-weak-map/node_modules/es6-iterator
npm info linkStuff es6-iterator@0.1.3
npm info install es6-iterator@0.1.3
npm info postinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color/node_modules/memoizee/node_modules/es6-weak-map
npm info linkStuff es6-weak-map@0.1.2
npm info install es6-weak-map@0.1.2
npm info postinstall es6-weak-map@0.1.2
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color/node_modules/memoizee
npm info linkStuff memoizee@0.3.8
npm info install memoizee@0.3.8
npm info postinstall memoizee@0.3.8
npm info preinstall es6-symbol@2.0.1
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/me
moizee/node_modules/es6-weak-map/node_modules/es6-iterator/node_modules/es6-symb
ol
npm info linkStuff es6-symbol@2.0.1
npm info install es6-symbol@2.0.1
npm info postinstall es6-symbol@2.0.1
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/me
moizee/node_modules/es6-weak-map/node_modules/es6-iterator
npm info linkStuff es6-iterator@0.1.3
npm info install es6-iterator@0.1.3
npm info postinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/me
moizee/node_modules/es6-weak-map
npm info linkStuff es6-weak-map@0.1.2
npm info install es6-weak-map@0.1.2
npm info postinstall es6-weak-map@0.1.2
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/me
moizee
npm info linkStuff memoizee@0.3.8
npm info install memoizee@0.3.8
npm info postinstall memoizee@0.3.8
npm info preinstall es5-ext@0.10.6
npm info install es6-iterator@0.1.3 into /var/lib/openshift/54f5215dfcf93302a100
018e/app-root/runtime/repo/node_modules/bower/node_modules/insight/node_modules/
inquirer/node_modules/cli-color/node_modules/es5-ext
npm info install es6-symbol@2.0.1 into /var/lib/openshift/54f5215dfcf93302a10001
8e/app-root/runtime/repo/node_modules/bower/node_modules/insight/node_modules/in
quirer/node_modules/cli-color/node_modules/es5-ext
npm info installOne es6-iterator@0.1.3
npm info installOne es6-symbol@2.0.1
npm info /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/node_
modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-color/
node_modules/es5-ext/node_modules/es6-iterator unbuild
npm info /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/node_
modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-color/
node_modules/es5-ext/node_modules/es6-symbol unbuild
npm info preinstall es6-symbol@2.0.1
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color/node_modules/es5-ext/node_modules/es6-symbol
npm info linkStuff es6-symbol@2.0.1
npm info install es6-symbol@2.0.1
npm info postinstall es6-symbol@2.0.1
npm info preinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color/node_modules/es5-ext/node_modules/es6-iterator
npm info linkStuff es6-iterator@0.1.3
npm info install es6-iterator@0.1.3
npm info postinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color/node_modules/es5-ext
npm info linkStuff es5-ext@0.10.6
npm info install es5-ext@0.10.6
npm info postinstall es5-ext@0.10.6
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-
color
npm info linkStuff cli-color@0.3.2
npm info install cli-color@0.3.2
npm info postinstall cli-color@0.3.2
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight/node_modules/inquirer
npm info linkStuff inquirer@0.6.0
npm info install inquirer@0.6.0
npm info postinstall inquirer@0.6.0
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/insight
npm info linkStuff insight@0.4.3
npm info install insight@0.4.3
npm info postinstall insight@0.4.3
npm info preinstall es5-ext@0.10.6
npm info install es6-iterator@0.1.3 into /var/lib/openshift/54f5215dfcf93302a100
018e/app-root/runtime/repo/node_modules/bower/node_modules/inquirer/node_modules
/cli-color/node_modules/es5-ext
npm info install es6-symbol@2.0.1 into /var/lib/openshift/54f5215dfcf93302a10001
8e/app-root/runtime/repo/node_modules/bower/node_modules/inquirer/node_modules/c
li-color/node_modules/es5-ext
npm info installOne es6-iterator@0.1.3
npm info installOne es6-symbol@2.0.1
npm info /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/node_
modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/
node_modules/es6-iterator unbuild
npm info /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/node_
modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/
node_modules/es6-symbol unbuild
npm info preinstall es6-symbol@2.0.1
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es
5-ext/node_modules/es6-symbol
npm info linkStuff es6-symbol@2.0.1
npm info install es6-symbol@2.0.1
npm info postinstall es6-symbol@2.0.1
npm info preinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es
5-ext/node_modules/es6-iterator
npm info linkStuff es6-iterator@0.1.3
npm info install es6-iterator@0.1.3
npm info postinstall es6-iterator@0.1.3
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color/node_modules/es
5-ext
npm info linkStuff es5-ext@0.10.6
npm info install es5-ext@0.10.6
npm info postinstall es5-ext@0.10.6
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer/node_modules/cli-color
npm info linkStuff cli-color@0.3.2
npm info install cli-color@0.3.2
npm info postinstall cli-color@0.3.2
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower/node_modules/inquirer
npm info linkStuff inquirer@0.7.1
npm info install inquirer@0.7.1
npm info postinstall inquirer@0.7.1
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
/node_modules/bower
npm info linkStuff bower@1.3.12
npm info install bower@1.3.12
npm info postinstall bower@1.3.12
npm info build /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo

npm info linkStuff meanjs@0.3.3
npm info install meanjs@0.3.3
npm info postinstall meanjs@0.3.3

> meanjs@0.3.3 postinstall /var/lib/openshift/54f5215dfcf93302a100018e/app-root/
runtime/repo
> bower install --config.interactive=false


Error: EACCES, permission denied '/var/lib/openshift/54f5215dfcf93302a100018e/.c
onfig'
    at Object.fs.mkdirSync (fs.js:642:18)
    at sync (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/n
ode_modules/bower/node_modules/mkdirp/index.js:70:13)
    at Function.sync (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/runti
me/repo/node_modules/bower/node_modules/mkdirp/index.js:76:24)
    at Object.create.all.get (/var/lib/openshift/54f5215dfcf93302a100018e/app-ro
ot/runtime/repo/node_modules/bower/node_modules/insight/node_modules/configstore
/index.js:41:13)
    at Object.Configstore (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/
runtime/repo/node_modules/bower/node_modules/insight/node_modules/configstore/in
dex.js:27:44)
    at new Insight (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime
/repo/node_modules/bower/node_modules/insight/lib/index.js:26:34)
    at ensureInsight (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/runti
me/repo/node_modules/bower/lib/util/analytics.js:26:19)
    at Object.setup (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtim
e/repo/node_modules/bower/lib/util/analytics.js:43:9)
    at Object.<anonymous> (/var/lib/openshift/54f5215dfcf93302a100018e/app-root/
runtime/repo/node_modules/bower/bin/bower:72:11)
    at Module._compile (module.js:456:26)

npm info meanjs@0.3.3 Failed to exec postinstall script
npm ERR! meanjs@0.3.3 postinstall: `bower install --config.interactive=false`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the meanjs@0.3.3 postinstall script.
npm ERR! This is most likely a problem with the meanjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install --config.interactive=false
npm ERR! You can get their info via:
npm ERR!     npm owner ls meanjs
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-504.3.3.el6.x86_64
npm ERR! command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "-d"
npm ERR! cwd /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/lib/openshift/54f5215dfcf93302a100018e/app-root/runtime/repo/n
pm-debug.log
npm ERR! not ok code 0
An error occurred executing 'gear postreceive' (exit code: 1)
Error message: CLIENT_ERROR: Failed to execute: 'control build' for /var/lib/ope
nshift/54f5215dfcf93302a100018e/nodejs

For more details about the problem, try running the command again with the '--tr
ace' option.
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/client.
rb:423:in `block in request'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/client.
rb:405:in `block in attempt'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/client.
rb:404:in `each'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/client.
rb:404:in `attempt'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/client.
rb:411:in `request'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/base.rb
:30:in `rest_method'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/rest/domain.
rb:68:in `add_application'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/commands/app
.rb:606:in `create_app'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/commands/app
.rb:155:in `block in create'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/highline_ext
ensions.rb:190:in `call'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/highline_ext
ensions.rb:190:in `section'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/highline_ext
ensions.rb:204:in `paragraph'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/helpers.rb:3
37:in `block (2 levels) in <module:Helpers>'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/commands/app
.rb:151:in `create'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/commands.rb:
294:in `execute'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/commands.rb:
285:in `block (3 levels) in to_commander'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/commander-4.3.0/lib/commander/c
ommand.rb:179:in `call'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/commander-4.3.0/lib/commander/c
ommand.rb:179:in `call'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/commander-4.3.0/lib/commander/c
ommand.rb:154:in `run'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/commander-4.3.0/lib/commander/r
unner.rb:419:in `run_active_command'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/command_runn
er.rb:100:in `run!'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/commander-4.3.0/lib/commander/d
elegates.rb:19:in `run!'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/lib/rhc/cli.rb:37:in
 `start'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.34.2/bin/rhc:20:in `<top
(required)>'
        from C:/ruby193/bin/rhc:23:in `load'
        from C:/ruby193/bin/rhc:23:in `<main>'

推荐答案

Bower通常用作生成器,以在本地设置代码的脚手架(在提交并推送更改之前).我认为Bower无法在OpenShift上正常工作,因为它期望$HOME目录可写.

Bower is usually used as a generator, to scaffold code locally (before you commit and push your changes). I don't think bower works correctly on OpenShift since it expects the $HOME dir to be writable.

我会尝试在本地进行此工作,然后提交并推送结果.

I'd try doing this work locally, then commit and push the result.

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

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