This project applies a complete test strategy to a Quarkus application.
In dev mode, database container is started automatically, so no manual setup is required.
mvn compile quarkus:devFor all packages, DB settings must be specified as environment variables before starting the application.
export QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://localhost:5432/todo
export QUARKUS_DATASOURCE_USERNAME=postgres
export QUARKUS_DATASOURCE_PASSWORD=postgresTo start a local database server, the following can be used:
cd src/main/docker/local-setup
docker compose up postgresmvn package
java -jar target/quarkus-app/quarkus-run.jarmvn package -Dquarkus.package.type=uber-jar
java -jar target/*-runner.jarEnsure to have GraalVM installed locally, e.g. by using SDKMAN.
mvn package -Pnative
./target/quarkus-maven-kotlin-1.0.0-SNAPSHOT-runner In src/main/docker/local-setup/docker-compose.yml a Docker Compose file is provided to run the native build in a
container.
This also starts a Postgres container. The native image must be build beforehand via Maven.
mvn package -Pnative -Dquarkus.native.container-build=true
docker compose -f src/main/docker/local-setup/docker-compose.yml build
docker compose -f src/main/docker/local-setup/docker-compose.yml up- http://localhost:8080/todos/ - API base
- http://localhost:8080/q/dev/ - Dev UI (dev mode only)
- http://localhost:8080/q/metrics/ - Metrics
- http://localhost:8080/q/swagger-ui/ - Swagger UI