Open mierzwid opened 5 years ago
Above is good but one thing missing in my opinion. There need to be set up some custom knotx module in directory knotx/extension/build.gradle (beside of aem/ branch) that will have set up building jar artifact and deployment to the knotx (probably just volume and copying pasting jar to correct place will do the job, vertx is detecting changes / reloads by itself)
design results (consulted with @Skejven )
1) knotx volume will point to unversioned directory / under .environment
(not aem/gradle/environment
as currently)
2) knotx configuration will be grabbed from downloaded distribution file knotx-stack.zip/knotx/conf
then unpacked under .environment/knotx/conf
then all files could be overridden by aem/gradle/environment/knotx/conf
(kinda overlay)
3) on file changes under aem/gradle/environment/knotx/conf
they will be copied to target location under volume so that Knotx will use changed file immediately
as a result, only project specific (example) knotx related files are versioned (less to maintain on GAP side), still it will be easy to get all updates from knotx side by bumping knotx-stack.zip version
similar design could be applied to built custom Knotx modules however then probably restarting Knotx container will be required (to reflect classpath changes)
Another solution for the classpath changes would be approach similar to one from the Knot.x Starter Kit, where custom Docker image is build every time dependencies/modules change. Additionally this approach can be also transferred to prepare production-ready artifacts (Docker way).
@Skejven FYI
gradle-aem-multi setups KnotX service side by side with dispatcher
docker-compose.yml
- additional KnotX containerGAP support: