Skip to content

Repository files navigation

doc-search Project

This project uses Quarkus, the Supersonic Subatomic Java Framework.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

Running the application in dev mode

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-docker

use

sudo apt-get install podman podman-docker

use

export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
export TESTCONTAINERS_RYUK_DISABLED=true

You can now run your application in dev mode:

./gradlew quarkusDev

try 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.0

Packaging and running the application

The application can be packaged using:

./gradlew build

It 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-jar

The application, packaged as an über-jar, is now runnable using java -jar build/*-runner.jar.

Creating a native executable

You can create a native executable using:

./gradlew build -Dquarkus.package.type=native

Or, 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=true

You 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.

Related Guides

  • 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

Provided Code

RESTEasy Reactive

Easily start your Reactive RESTful Web Services

Related guide section...

SmallRye Health

Monitor your application's health using SmallRye Health

Related guide section...

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages