Meteor 1.4:Amazon EC2上的Mup部署:验证部署时出错

时间:2016-08-23 11:42:53

标签: meteor amazon-ec2 meteor-up

我是meteor的新手,我开发了一个流星应用程序并在本地工作正常。我的配置如下:

本地主机

操作系统:Ubuntu 14.04 LTS, Metoer版本:Metoer 1.4, Node.js(ubuntu):4.4.3(通过执行命令#nodejs -v), Node.js(npm):3.10.6(通过执行命令#npm nodejs -v)

我的要求

  1. 在运行应用程序时,我会在应用程序目录中执行命令(#meteor)以后应用程序将在http://localhost:3000中运行

  2. 我想将流星应用程序部署到亚马逊EC2中。我在EC2上安装了meteor,mongodb,将相同的项目文件夹移动到了amazon ec2。 以" www.mysitename.com:3000"访问网站时,网站正在运行通过执行命令(#meteor),但用户不会总是键入端口号

  3. 我想将流星应用程序运行为" www.mysitename.com"而不是" www.mysitename.com:3000"。如果我们想要在远程服务器上托管,应该(#meteor)命令应该始终运行吗?

  4. 我尝试使用mup init,mup setup,mup deploy命令进行流量测试。验证部署时出错

    $mup deploy update 1.0.2 => 1.0.3 Building App Bundle Locally

    `启动任务列表:推动流星  [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 将Meteor App Bundle推送到服务器  [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 将Meteor App Bundle推送到服务器:SUCCESS [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 推送启动脚本 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 推动启动脚本:成功 {public:{}}

    启动TaskList:配置流星环境变量 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 发送环境变量 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 发送环境变量:成功

    启动TaskList:启动Meteor [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 启动流星 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 开始流星:成功 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] - 验证部署 [ec2-54-199-248-21.ap-northeast-1.compute.amazonaws.com] x验证部署:FAILED`

    -----------------------------------STDERR-----------------------------------
    package.json meteor-dev-bundle@0.0.0 No description
    npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
    npm WARN package.json meteor-dev-bundle@0.0.0 No README data
    npm WARN cannot run in wd meteor-dev-bundle@0.0.0 node npm-rebuild.js (wd=/bundle/bundle/programs/server)
    => Starting meteor app on port:80
    
    assert.js:93
      throw new assert.AssertionError({
            ^
    AssertionError: "undefined" === "function"
        at wrapPathFunction (/bundle/bundle/programs/server/mini-files.js:77:10)
        at Object.<anonymous> (/bundle/bundle/programs/server/mini-files.js:108:24)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/bundle/bundle/programs/server/boot.js:9:13)
        at Module._compile (module.js:456:26)
    
    => Redeploying previous version of the app
    
    -----------------------------------STDOUT-----------------------------------
    
    To see more logs type 'mup logs --tail=50'
    
    ----------------------------------------------------------------------------
    
  5. 我的Mup.js文件

    module.exports = {
    servers: {
        one: {
            host:       'amazon-aws-host-public-dns-name',
            username:   'username',
           //password:   '', // or leave blank for authenticate from ssh-agent
            pem:       '../permissionfile.pem' // or leave blankfor authenticate from ssh-agent
        }
    },
    
    meteor: {
        name: 'meteor-app-name',
        path: '/local-directory-of-meteor-app/meteor-app-name/', // localpath
        servers: {
            one: {
                host:       'amazon-aws-host-public-dns-name',
                username:   'username'
            },
        },
        env: {
            PORT: 80, // optional, defaults to 80
            ROOT_URL: 'http://amazon-aws-host-public-dns-name',
            MONGO_URL: 'mongodb://amazon-aws-host-public-dns-name/postAd', // postAd is the mongodb-name. I did not create the same in aws
            //MONGO_OPLOG_URL: 'mongodb://oplogUser:mongo@domain.co'
        },
    
        deployCheckWaitTime: 120 //default 10, if you're having issues try increasing this value up to 600 //
    },
    mongo: { //optional
        oplog: true,
        port: 27017,
        servers: {
            one: {},
        },
    },
    };
    

    ` 5.请指导我清除错误并继续使用$ mup deploy或建议任何替代解决方案,但在galaxy,digitalocean等中托管除外。 6.此外,我使用meteor命令进行部署    $ meteor build / path   我收到了meteor-app-name.tar.gz。我可以使用压缩文件将其部署到我的amazon-ec2 ubuntu实例中吗?任何人都可以指导我吗?

0 个答案:

没有答案