node.js - 如何使用 github 源在 openshift 上部署 express node-js 实现?
问题描述
我已尝试遵循文档,甚至部署了示例应用程序,但我一直遇到以下构建错误:
Cloning "https://github.com/neelrr1/bordPublic " ...
Commit: 676e5b2c72118cba4079d437232ad320beb85231 (alot of changes...)
Author: Neel Raja <abdulbasit.ali.2000@gmail.com>
Date: Sat Sep 1 03:13:56 2018 +0000
Pulling image "docker-registry.default.svc:5000/openshift/nodejs@sha256:b605bc8d918f88602d038f0c23268343d3aee6445de0806ce4ff8e67c4d14c66" ...
---> Installing application source
---> Building your Node application from source
Current git config
url.https://github.com.insteadof=git@github.com:
url.https://.insteadof=ssh://
url.https://github.com.insteadof=ssh://git@github.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/neelrr1/bordPublic
remote.origin.fetch=+refs/heads/master:refs/remotes/origin/master
branch.master.remote=origin
branch.master.merge=refs/heads/master
---> Installing dependencies
---> Using 'npm install -s --only=production'
error: build error: non-zero (13) exit code from docker-registry.default.svc:5000/openshift/nodejs@sha256:b605bc8d918f88602d038f0c23268343d3aee6445de0806ce4ff8e67c4d14c66
我正在尝试仅使用 github 源代码来构建我的应用程序,但我愿意尝试其他可能有效的想法。谢谢!
解决方案
众所周知,该npm
程序在安装软件包时会占用大量内存。您很可能内存不足。增加分配给构建的内存量。看:
简而言之,增加内存运行:
oc patch bc/yourappname --patch '{"spec":{"resources":{"limits":{"memory":"1Gi"}}}}'
推荐阅读
- java - 尝试显示不在菜单中的片段时,导航抽屉活动项目中的片段重叠
- python - 我如何覆盖 Django Rest Auth 注册?
- python - AttributeError: 'str' 对象没有属性 'ndim' [Python | 喀拉斯]
- python - 在 Python 中使用 AutoReg 函数进行 1 个月预测
- python - Formset 保存除 0 以外的任何小数,即使 formset 已保存且 is_valid() 通过
- java - 如何在 java 中编写(和修复)没有循环的代码
- google-app-engine - 等待太久以尝试为您的请求提供服务后请求被中止 appEngine 标准环境 自动扩展?
- c++ - 富编辑控件在出现拼写检查下划线时发送 EN_CHANGE
- python - 如何让 Flask 包教程与 Poetry 一起使用?
- awk - 在 awk 中转置数据