如何使用 docker 运行 JHipster UAA?

How to run JHipster UAA with docker?

我已经用这个 JDL 生成了一个应用程序

deployment {
  deploymentType docker-compose
  appsFolders [gateway, uaa]
  dockerRepositoryName "10.1.10.58:5000"
}

application {
  config {
    baseName uaa
    applicationType uaa,
  }
}

application {
  config {
    baseName gateway
    applicationType gateway,
    packageName com.rps.png,
    authenticationType uaa,
    uaaBaseName "uaa",
  }
}

使用 JHipster 导入,构建了 docker 个图像和 运行 docker-compose up。应用程序启动但 UAA 无法注册到 JHipster 注册表。

----------------------------------------------------------
    Application 'uaa' is running! Access URLs:
    Local:      http://localhost:9999/
    External:   http://172.18.0.4:9999/
    Profile(s):     [prod, swagger]
----------------------------------------------------------

与 JHipster 注册表没有关联。我的 JDL 上是否遗漏了什么?

JDL 生成的 UAA 应用的 serviceDiscoveryType 当前默认值为 nonerelated code), you can verify this by looking at the .yo-rc.json file generated in the UAA app folder. This is a difference between the JHipster prompt defaults and JDL defaults, an issue can be opened about this on the jhipster-core Github。

简单的修复方法是在 UAA 应用 JDL 配置中设置 serviceDiscoveryType eureka