简体   繁体   中英

Can I use a shared jhipster-registry and uaa in a remote server (Docker) and developers connect to it as a service?

In a development team, we are working on a jhipster microservice project with Uaa, Jh-registry, mic 1, mic 2 and gateway.

The question here is it possible to deploy shared Uaa and Jh-registry in a remote server using Docker and other developers on either mic 1 and mic 2 use them as a service?

If the answer is yes, is there any config or inspiration sample available?

The answer is yes and there's very little to do, just edit the src/main/resources/config/bootstrap.yml file of your gateway, uaa and microservices so that they point to the registry url for config:

spring:
  ...
  cloud:
    config:
      fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config
      uri: http://admin:${jhipster.registry.password}@my-registry.example.com:8761/config

And then for Eureka server url, edit application*.yml in applications and registry to change defaultZone

eureka:
  ...
  client:
    service-url:
      defaultZone: http://admin:${jhipster.registry.password}@my-registry.example.com:8761/eureka/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM