如何在开发模式下启动 Docker Axon 服务器

How to start Docker Axon server in development mode

我是 Axon 和 Docker 的新手,我想在 Docker 中使用开发模式启动 axon 服务器,以便在构建系统的过程中清除事件我的事件和命令经常变化。

我在 Axon 文档中读到必须设置某个 属性 axoniq.axonserver.devmode.enabled(默认为 false)。我也知道 Axon 使用 spring 引导,所以我想我需要以某种方式访问​​ Docker 上的 axonserver.properties,但问题是,我不知道如何。

如果有人能解释如何更改此配置,我将不胜感激。

幸运的是,Axon 一直在发布有关 运行ning axon-server 的博客,其中之一,他们在 docker 上教授如何 运行 =)

博客post:https://axoniq.io/blog-overview/running-axon-server-in-docker

对于您而言,重要的部分在这里:

A third directory, not marked as a volume in the image, is important for our case: If you put an “axonserver.properties” file in “/config”, it can override the settings above and add new ones:

这意味着,您可以在此目录中使用所需的 属性 (axoniq.axonserver.devmode.enabled=true) 创建 axonserver.properties,它会从那里获取它!

另一方面,你也可以设置环境变量:AXONIQ_AXONSERVER_DEVMODE_ENABLEDtrue

希望对您有所帮助。