且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在单个AWS EC2实例上设置3节点Elasticsearch集群?

更新时间:2022-11-07 13:08:09

您需要在docker-compose中配置links以便能够解析:

you need to configure links in your docker-compose to be able to resolvable:

来自docker-compose Docs:

from docker-compose Docs:

链接到另一个服务中的容器.既可以指定服务名称,也可以指定链接别名(SERVICE:ALIAS),也可以仅指定服务名称.

Link to containers in another service. Either specify both the service name and a link alias (SERVICE:ALIAS), or just the service name.

web:
  links:
   - db
   - db:database
   - redis

,也请参见@ Mishi.Srivastava

and see the comment also from @Mishi.Srivastava