我如何在DigitalOcean Meteor up中部署Meteor应用程序:来自守护程序的错误响应:没有这样的容器 [英] How can I deploy Meteor app in DigitalOcean Meteor up: Error response from daemon: No such container
问题描述
我已经完成了在流星中开发应用程序的工作,我希望将其与Meteor一起从DigitalOcean部署到Web上. 我已经阅读了一些文档,以了解要执行的步骤.
I have finished developing my application in meteor and I want to deploy it to the web from DigitalOcean with Meteor up. I have read some documentation to understand the steps to follow.
http://meteortips.com/deployment-tutorial/digitalocean-part- 1/
然后使用DigitalOcean提供的数据配置mup.js.我运行mup setup命令,这里没有问题,它安装了Docker,Meteor,Mongo.但是当我运行mup deploy命令时,终端会显示以下错误消息.
Then configure the mup.js with the data that DigitalOcean delivers. I run the mup setup command, there is no problem here, it installs Docker, Meteor, Mongo. But when I run the mup deploy command, the terminal shows me the following error message.
我真的不知道这个容器与Docker有关.我希望有人解释解决该问题所必须采取的步骤.
This container I think has to do with Docker, I really do not know. I would like someone to explain the steps I must take to solve this problem.
$ docker ps
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
守护程序的错误响应:没有这样的容器:perfilesg .如下图所示.
module.exports = {
servers: {
one: {
host: '162.243.136.97',
username: 'root',
pem: '~/.ssh/id_beri'
}
},
app: {
// TODO: change app name and path
name: 'perfilesgs',
path: '.',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://162.243.136.97',
MONGO_URL: 'mongodb://localhost/meteor',
},
// ssl: { // (optional)
// // Enables let's encrypt (optional)
// autogenerate: {
// email: 'email.address@domain.com',
// // comma separated list of domains
// domains: 'website.com,www.website.com'
// }
// },
docker: {
// change to 'kadirahq/meteord' if your app is using Meteor 1.3 or older
image: 'abernix/meteord:base',
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true,
deployCheckWaitTime: 300
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
}
};
推荐答案
准备包"任务是在Meteor Up的1.3.0版本中引入的(请参见
The task "Prepare bundle" was introduced in the version 1.3.0 of Meteor Up (see release notes):
将捆绑包上传到每个服务器后,将运行一个名为准备捆绑包"的新任务.它安装Meteor npm依赖项,重建本机模块,并将结果存储在docker映像中.这有一些好处:
After the bundle is uploaded to each server, a new task is run called "Prepare bundle". It installs the Meteor npm dependencies, rebuilds native modules, and stores the result in a docker image. This has a few benefits:
- 在meteor.deployCheckWaitTime中的时间不再需要包括安装npm依赖项的时间
- 当安装依赖项失败时,它不会持续重新启动,直到meteor.deployCheckWaitTime到期,并以--verbose运行会显示npm install的完整日志
- 依赖项在每次部署期间仅安装一次.这意味着mup启动,mup重新启动和mup重新配置都快得多.
- The time in meteor.deployCheckWaitTime no longer needs to include the time to install npm dependencies
- When installing dependencies fails, it does not continuously restart until meteor.deployCheckWaitTime expires, and running with --verbose shows the full logs from npm install
- Dependencies are only installed once during each deploy. This means that mup start, mup restart, and mup reconfig are all much faster.
从1.3.1版开始,可以通过在mup.js中添加选项app.docker.prepareBundle
并将其设置为false
来禁用此任务.几周前,我处理了相同的错误,并且通过这种解决方法,我能够将应用程序部署到DigitalOcean.
From the version 1.3.1 this task can be disabled by adding the option app.docker.prepareBundle
in mup.js and setting it to false
. I dealt with the same error a few weeks ago and with this workaround I was able to deploy my application to DigitalOcean.
这篇关于我如何在DigitalOcean Meteor up中部署Meteor应用程序:来自守护程序的错误响应:没有这样的容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!