【发布时间】:2018-03-12 17:03:10
【问题描述】:
Mup 版(1.4.3):
module.exports = {
servers: {
},
meteor: {
// TODO: change app name and path
name: 'e-commerce',
path: '../../store', //diff
servers: {
// one: {},
two: {},
three: {},
four: {},
five: {},
six: {},
seven: {}
},
buildOptions: {
serverOnly: true,
cleanAfterBuild: false,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'https://someurl.com',
MONGO_URL: 'xxx',
},
docker: {
// change to 'kadirahq/meteord' if your app is not using Meteor 1.4
//image: 'abernix/meteord:base',
image: 'abernix/meteord:node-8.4.0-base'
// imagePort: 80, // (default: 80, some images EXPOSE different ports)
},
deployCheckWaitTime: 80,
enableUploadProgressBar: true
}
};
2gb / 8g 填充后的命令输出
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
我已经在流星论坛here详细说明了我的错误
原来没有足够的内存,我需要增加here中包含的内存
当 mup 运行我的应用程序时,我需要传递环境变量,我该如何输入该示例 main.js --node-args="--max-old-space-size=6144"
如何使用 mup 配置传递参数? 非常感谢任何建议或帮助。
【问题讨论】:
-
我认为你不能不分叉
abernix/meteord:base,因为run_app.js 只是运行不带参数的main.js文件。 -
@MasterAM 是否可以将其设置为环境变量?
-
可能使用
NODE_OPTIONS。有关更多详细信息,请参阅the cli reference(声明它是在节点 v8.0 中添加的,因此它可能需要 Meteor v1.6+)。