【问题标题】:How to pass arguments in mup config for meteor run command?如何在 mup 配置中为流星运行命令传递参数?
【发布时间】: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+)。

标签: meteor mup


【解决方案1】:

我刚刚分叉了 repo 并修改并创建了一个新图像。已经在运行了。谢谢提示

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-05
    • 2011-08-22
    • 2016-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多