An open API service indexing awesome lists of open source software.

https://github.com/t1/wildfly-glow-demo

Demos a Jakarta EE application providing a JAX-RS and a GraphQL service, and use Glow to create a custom WildFly runtime, using it for tests.
https://github.com/t1/wildfly-glow-demo

Last synced: about 1 year ago
JSON representation

Demos a Jakarta EE application providing a JAX-RS and a GraphQL service, and use Glow to create a custom WildFly runtime, using it for tests.

Awesome Lists containing this project

README

          

= WildFly Glow Demo

Demos a https://jakarta.ee[Jakarta EE] application providing a JAX-RS and a GraphQL service, and use https://docs.wildfly.org/wildfly-glow/[Glow] to create a custom https://www.wildfly.org[WildFly] runtime, using it for integration tests.

== Running

=== During ITs

The normal Maven build executes the ITs with a locally provisioned WildFly.
As the default goal is `verify`, you can simply run:

[source,bash]
----
mvn
----

=== Dev-Mode

You can also develop/test it in WildFly dev mode, i.e. changes to your code get picked up and redeployed automatically.
Just run:

[source,bash]
----
mvn wildfly:dev -Pdevmode
----

The `-Pdevmode` profile is used to enable:
* the GraphiQL UI you can access at http://localhost:8080/graphql-ui
* the Swagger UI you can access at http://localhost:8080/rest/openapi-ui/index.html

Switching between the two modes requires a `mvn clean`, as the `ROOT.war` generated by the `wildfly:dev` mode is a directory, while the `verify` goal generates it as a file.

=== Bootable JAR

A third option is to run the bootable JAR with:

[source,bash]
----
java -jar target/server-bootable.jar
----

=== Docker

To generate a Docker image, you need the WildFly Glow CLI; it's not yet supported by the maven plugin.
You can download the latest release from https://github.com/wildfly/wildfly-glow/releases[here], unpack it `${SOMEWHERE}`, and run:

[source,bash]
----
$SOMEWHERE/wildfly-glow scan --cloud --provision=DOCKER_IMAGE target/ROOT.war

docker run --rm -it -p 8080:8080 -p 9990:9990 --name widlfly-glow-demo wildfly-glow-image-server-31_0_1_final
----