docker compose generation #50352
vsevel
started this conversation in
Design Discussions
Replies: 1 comment
-
@ozangunalp WDYT? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
the compose feature is great, but it can be cumbersome to create the compose file, and even harder to keep it up to date.
in our extensions we have developed a mechanism that generates a docker compose based on extensions used in the application.
for instance if the application uses the jms, kafka and apicurio extensions, at build time we will generate
target/compose/compose-devservices.yml
, with content:plus an additional
kafka.sh
(with content as seen in documentation).the dev team can decide to copy those resources to
./
under source control so they get used in dev mode.if we see there is a file in
./
:it works like the
formatter
andimpsort
plugins: update file under source control in dev, check in CI.the last piece that we have is the ability to complement and/or override some values in the generated file.
for instance we may create
./override-compose-devservices.yml
with content:then at build time, we will now generate the following file:
in terms of implementation, we created:
some of our extensions will create
ComposeBuildItem
objects. For instance for kafka:we have also a
src/main/resources/kafka.template.yaml
, which is basically a copy of https://quarkus.io/guides/kafka#Composethe final touch is a processor, which will process all
ComposeBuildItem
objects, generatetarget/compose/compose-devservices.yml
, apply overrides if needed, and either copy file into./
(local mode) or check for differences (CI).this feature allows to use compose with some of the transparency used in dev services.
I am wondering if this could be a good fit for quarkus.
cc @cescoffier @ozangunalp
Beta Was this translation helpful? Give feedback.
All reactions