jhipsterjhipster-registry

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?


Solution

  • 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/