This sample persistent todo application uses Quarkus.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/.
This application uses Red Hat's Maven repositories to download its dependencies and thus establish a trusted source.
To build locally: - Java 17+
To build and run the application in containers: - Docker or Podman
- A PostgreSQL database instance (ensure it's accessible and update application.properties with its connection details).
NOTE: Application expects to have a postgres db running on localhost on port 5432 when running locally This requires registering with registry.redhat.io to be able to pull the appropriate UBI backed container image
Usage:
# Run Red Hat UBI based container image with Postgres
podman run -d --name postgresql_database -e POSTGRESQL_USER=qtodo_user -e POSTGRESQL_PASSWORD=RedH@tPassw0rd -e POSTGRESQL_DATABASE=tasks -p 5432:5432 registry.redhat.io/rhel8/postgresql-16You can then run your application in dev mode that enables live coding using:
./mvnw -s settings.xml quarkus:devIf you have built the container beforehand, you can start a pod with the application and the database using podman:
podman play kube resources/qtodo-pod.yamlOpen your web browser and navigate to http://localhost:8080/.
Tasks will be persisted in the PostgreSQL database.

The application can be packaged using:
./mvnw packageIt produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.jar.type=uber-jar- or -
make buildThe application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
You can create a native executable using:
./mvnw -s settings.xml package -DnativeOr, if you don't have GraalVM installed, you can run the native executable build in a container using:
./mvnw -s settings.xml package -Dnative -Dquarkus.native.container-build=trueIf you want to create a container with the qtodo application, you can do so using:
make build-imageWe can also add our own manually generated jar to the image instead of performing the build step. That file must be in the target/ directory.
export ARTIFACT=qtodo-example-runner.jar
make build-image-binary