Clone sample source code from
git clone https://github.com/erfinfeluzy/quarkus-demo.git
Or, generate from project skeleton
mvn io.quarkus:quarkus-maven-plugin:0.19.1:create \
-DprojectGroupId=com.erfinfeluzy.demo.quarkus \
-DprojectArtifactId=quarkus-demo \
-DclassName="com.erfinfeluzy.demo.quarkus.HelloResource" \
-Dpath="/hello"
mvn compile quarkus:dev:
run on different port
mvn compile quarkus:dev: -Dquarkus.http.port=8081
$ curl localhost:8080/api
hello
Change java class, then Quarkus will hot deploy it.
- Install GraalVM, set $GRAALVM_HOME
mvn package -Pnative
mvn clean package -Dnative -Dquarkus.native.container-build=true
Note: i need to increase local docker memory due to OutOfMemoryError during building
docker build -f src/main/docker/Dockerfile.native -t quarkus/quarkus-project .
docker run -i --rm -p 8080:8080 quarkus/quarkus-project
docker tag quarkus/quarkus-project quay.io/efeluzy/quarkus-demo-orm:latest
docker push quay.io/efeluzy/quarkus-demo-orm:latest
- Add To Project > Deploy Image > Image Name > quay.io/efeluzy/quarkus-demo-orm:latest
- Click Search, Select project
- Click Deploy