部署到Digital Ocean时,使用docker和mongodb的Mup错误

时间:2018-03-01 14:44:26

标签: mongodb docker meteor deployment mup

我正在尝试使用mup部署Meteor应用程序,并且它一直给我这个错误:

[xxx.xxx.xxx.xxx] x Start Mongo: FAILED

          ------------------------------------STDERR------------------------------------
          Error response from daemon: Container a1617b2aaaa3fd4aeb8e1241ec90ae32b4a88b0df9c95e5d73de608b68788ef0 is not running
    docker: Error response from daemon: driver failed programming external connectivity on endpoint mongodb (2f5db292f7022a39dfe3ff5fdf5ed7de38ddc7bb6f787625cd0fb45a5fa10cd6): Error starting userland proxy: listen tcp 127.0.0.1:27017: bind: address already in use.

          ------------------------------------STDOUT------------------------------------
          3.2.15: Pulling from library/mongo
    Digest: sha256:ef3277c7221e8512a1657ad90dfa2ad13ae2e35aacce6cd7defabbbdcf67ca76
    Status: Image is up to date for mongo:3.2.15
    mongodb
    mongodb
    Running mongo:3.2.15
    97a28fe9d2dca6130ffe6622e662a230ecea34214920673c574a4d3e57fafb3c

          ------------------------------------------------------------------------------

我已经检查过,我可以通过ssh连接到服务器。我正在使用Digital Ocean的一键式水滴之一,因为它已经安装了Mongodb。服务器上的Mongodb版本是3.4,在我的应用程序中我使用的是3.2.15,我不知道是否应该降级或升级其中一个,或者即使问题存在也是如此。

我的mup.js文件如下所示:

module.exports = {  servers: {
one: {
  host: 'xxx.xxx.xxx.xxx',
  username: 'root',
  pem: '~/.ssh/id_rsa'
  // or neither for authenticate from ssh-agent
}
},
meteor: {
name: 'myApp',
path: '../myApp/',

servers: {
  one: {},
},

buildOptions: {
  serverOnly: true,
},

env: {
  // If you are using ssl, it needs to start with https://
  ROOT_URL: 'http://app.com',
  "PORT": 80,
  MONGO_URL: 'mongodb://localhost/local',
  //MONGO_OPLOG_URL: 'mongodb://mongodb/local',
},
deployCheckWaitTime: 60,

docker: {
  // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
  image: 'abernix/meteord:base',
},

// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},

mongo: {
version: '3.2.15',
servers: {
  one: {}
}
},
};

我对此感到疯狂,有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

尝试使用Ubuntu而不是mongo在Digital Ocean上创建一键式Droplet,因为mup已经为你设置了mongo。我相信Meteor UP假设它从新设置进行部署。

相关问题