This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
You need to setup docker/podman to use the test containers for elastic search. I have used this description to use podman in ubuntu;
https://quarkus.io/blog/quarkus-devservices-testcontainers-podman/
Instead of
sudo dnf install podman podman-dockeruse
sudo apt-get install podman podman-dockeruse
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
export TESTCONTAINERS_RYUK_DISABLED=trueYou can now run your application in dev mode:
./gradlew quarkusDevtry running http://localhost:8080/q/health-ui/ to see if elasticsearch is ok (or go in via http://localhost:8080/q/dev/).
You can also try running elastic search in a podman outside devservices (switch inside application.properties):
podman run --name elasticsearch -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" --rm -p 9200:9200 docker.elastic.co/elasticsearch/elasticsearch:7.17.0The application can be packaged using:
./gradlew buildIt produces the quarkus-run.jar file in the build/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the build/quarkus-app/lib/ directory.
The application is now runnable using java -jar build/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./gradlew build -Dquarkus.package.type=uber-jarThe application, packaged as an über-jar, is now runnable using java -jar build/*-runner.jar.
You can create a native executable using:
./gradlew build -Dquarkus.package.type=nativeOr, if you don't have GraalVM installed, you can run the native executable build in a container using:
./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=trueYou can then execute your native executable with: ./build/doc-search-1.0.0-runner
If you want to learn more about building native executables, please consult https://quarkus.io/guides/gradle-tooling.
- SmallRye OpenTracing (guide): Trace your services with SmallRye OpenTracing
- SmallRye OpenAPI (guide): Document your REST APIs with OpenAPI - comes with Swagger UI
- SmallRye Fault Tolerance (guide): Define fault-tolerant services
- Hibernate ORM with Panache (guide): Simplify your persistence code for Hibernate ORM via the active record or the repository pattern
- Hibernate Search + Elasticsearch (guide): Automatically index your Hibernate entities in Elasticsearch
- SmallRye JWT (guide): Secure your applications with JSON Web Token
- SmallRye Health (guide): Monitor service health
- SmallRye Context Propagation (guide): Propagate contexts between managed threads in reactive applications
- SmallRye Metrics (guide): Expose metrics for your services
Easily start your Reactive RESTful Web Services
Monitor your application's health using SmallRye Health