vinayakakv / course-registration-quarkus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Course Registration Quarkus

This project was intended as a learning experience in Quarkus + Hibernate ORM with deployment in Kubernetes

Running the application in dev mode

./mvnw compile quarkus:dev

Be sure to run the postgres image with port 5432 exposed.

Also change quarkus.hibernate-orm.database.generation=drop-and-create in /src/main/resources/application.properties to generate the appropriate schema.

Packaging, Containerization and Running

The application can be packaged using:

./mvnw clean package

Note: Building requires rsync as a dependency to copy frontend build files to quarkus directory

Build docker image of the server using:

docker build -f src/main/docker/Dockerfile.jvm -t quarkus/course-registration-jvm .

Build database image using:

docker build -f src/main/docker/Dockerfile.database -t quarkus/course-registration-database .

Run the containers using:

docker-compose up

Kubernetes

The kubernetes configuration files in kubernetes are generated using kompose.

Before applying them, execute:

eval $(minikube docker-env)

to set the docker environment from minikube.

Then, for all deployments, set spec.template.spec.containers[0].imagePullPolicy=Never to use local images.

Build every docker image as described in above section to make them available to the new docker environment.

Then, cd to kubernetes/ folder, and execute

kubectl apply -f .

After that, port forward to see the application in action as:

kubectl port-forward server-<...> 8080:8080

And navigate to http://localhost:8080/

About


Languages

Language:Java 52.3%Language:JavaScript 42.2%Language:CSS 3.6%Language:HTML 1.8%