我在docker-compose中使用spring-cloud发现服务。我控制下的所有spring-boot服务都是通过“EnableDiscoveryClient”在启动时注册的。
但是我的docker-compose中有其他服务,我从他们的dockerhub图像运行。我怎样才能注册它们(数据库,ldap,...) 有没有办法配置eureka来查找已定义的组件(pull)而不是客户端“push”?
答案 0 :(得分:1)
你必须实现一个Sidecar
应用程序,最有可能使用数据库创建一个Docker
图像,来自dockerhub的ldap图像作为起点。
我发布了一篇关于这个确切主题的博文:Microservices Sidecar pattern implementation using Postgres, Spring Cloud Netflix and Docker