如何部署MongoDB的码头工人形象弹性魔豆? [英] How to deploy mongoDB Docker image to Elastic Beanstalk?

查看:156
本文介绍了如何部署MongoDB的码头工人形象弹性魔豆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用泊坞窗和AWS弹性魔豆运行我的多服务架构。其中的一个服务是一个MongoDB的泊坞的形象。它应该暴露的端口27017,以便其他服务可以连接到蒙戈DB的端口。不幸的是弹性魔豆内部的nginx仅公开80端口,所以我的服务无法连接到蒙戈DB端口27017。

i'm running my multi services architecture using Docker and aws Elastic Beanstalk. One of those services is a mongoDB Docker image. It's supposed to expose port 27017 so other services can connect to the mongo DB in that port. Unfortunately Elastic Beanstalk internal nginx only exposes port 80, so my services aren't able to connect to mongo DB on port 27017.

我已经看到了一些答案( http://stackoverflow.com/a/24831425/1116959 )周围使用在/.ebextensions文件夹里面的一些配置文件,但我不知道如何得到这个工作与解决方法。

I've seen some answers (http://stackoverflow.com/a/24831425/1116959) around using some config files inside the /.ebextensions folder, but i don't know how to get this working with that workaround.

我的架构还包括一个RabbitMQ的业务和其它应用服务(蟒+芹菜)。有谁知道,如果这是更好地开始使用Amazon VPC?

My architecture also includes a rabbitMQ service and other application services (python+celery). Does anyone know if it's better to start using Amazon VPC?

任何帮助是AP preciated,谢谢

Any help is appreciated, thanks

推荐答案

Dockerrun.aws.json 有一整节的端口。你可以用这个来代替下层ebextensions配置文件。

Dockerrun.aws.json has a whole section for ports. You could use that instead of the lower layer ebextensions config file.

{
  "AWSEBDockerrunVersion": "1",
  "Authentication": {
    "Bucket": "my-bucket",
    "Key": "mydockercfg"
  },
  "Image": {
    "Name": "janedoe/image",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": "1234"
    }
  ],
  "Volumes": [
    {
      "HostDirectory": "/var/app/mydb",
      "ContainerDirectory": "/etc/mysql"
    }
  ],
  "Logging": "/var/log/nginx"
}

这篇关于如何部署MongoDB的码头工人形象弹性魔豆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆