在Elastic Beanstalk中从Docker公开多个端口

在Elastic Beanstalk中从Docker公开多个端口,第1张

在Elastic Beanstalk中从Docker公开多个端口

您可以为Elastic Beanstalk的LoadBalancer / ReversProxy编写启动配置文件,以将其他端口转发到其EC2实例。Ben
Delarre的
一个例子:

"Resources" : {  "AWSEBLoadBalancerSecurityGroup": {    "Type" : "AWS::EC2::SecurityGroup",    "Properties" : {      "GroupDescription" : "Enable 80 inbound and 8080 outbound",      "VpcId": "vpc-un1que1d",      "SecurityGroupIngress" : [ {        "IpProtocol" : "tcp",        "FromPort" : "80",        "ToPort" : "80",        "CidrIp" : "0.0.0.0/0"      }],      "SecurityGroupEgress": [ {        "IpProtocol" : "tcp",        "FromPort" : "8080",        "ToPort" : "8080",        "CidrIp" : "0.0.0.0/0"      } ]    }  },  "AWSEBLoadBalancer" : {    "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",    "Properties" : {      "Subnets": ["subnet-un1que1d2"],      "Listeners" : [ {        "LoadBalancerPort" : "80",        "InstancePort" : "8080",        "Protocol" : "HTTP"      } ]    }  }}

参考:

  • 定制AWS EB的ENV http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html
  • http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/using-elb-listenerconfig-quickref.html


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5163201.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-18
下一篇 2022-11-18

发表评论

登录后才能评论

评论列表(0条)

保存