How to include Quinoa frontend build in Docker image using Quarkus's default Dockerfile.jvm? #791
-
Hi Quinoa community, I'm working on a project using Quarkus and Quinoa to build my frontend with SvelteKit. The frontend files are successfully generated in the What is the best approach to automatically include the Quinoa frontend build files in the Docker image, so both backend and frontend are available in the same image? Here's what I've tried so far: I noticed that the default Dockerfile.jvm doesn't handle the Quinoa build output. I manually added Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
I think you want this property: https://docs.quarkiverse.io/quarkus-quinoa/dev/config-reference.html#quarkus-quinoa_quarkus-quinoa-build-dir
|
Beta Was this translation helpful? Give feedback.
-
If it can help, I have a repo here https://github.com/fblan/QuarkusSvelteKitDemo that is able to run a sveltekit application with a very basic routing, and communicating with backend. It is an old project, and I don't remember if I have done something special to make it work. I will have look tomorrow morning. |
Beta Was this translation helpful? Give feedback.
-
hey! sorry for the late reply. We've been running our monolithic application in docker just fine. We run the build with JIB (so without dockerfile) in our CICD pipeline and push it directly to the registry where it is auto-deployed to a cluster. This is the build command: mvn compile quarkus:build \
-DskipTests \
-Dquarkus.container-image.group=$DOCKER_GROUP \
-Dquarkus.container-image.registry=$DOCKER_REGISTRY \
-Dquarkus.container-image.tag=latest \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \ and here our quinoa related quarkus.quinoa.build-dir=build
quarkus.quinoa.enable-spa-routing=true
quarkus.quinoa.dev-server.port=5173 If your use-case allows it I'd suggest you take a look at jib - doesn't need a docker daemon, less priviliges, and integrates directly into maven/gradle. Hope this helps you. |
Beta Was this translation helpful? Give feedback.
-
@melloware @fblan @trpouh Thank you for taking the time to help me out! I found the solution to the problem. In my pom I was using
I analyzed https://github.com/fblan/QuarkusSvelteKitDemo and saw that @fblan is using |
Beta Was this translation helpful? Give feedback.
@melloware @fblan @trpouh Thank you for taking the time to help me out! I found the solution to the problem. In my pom I was using
I analyzed https://github.com/fblan/QuarkusSvelteKitDemo and saw that @fblan is using
quarkus-resteasy-reactive
. I changed the dependencies to these ones and voila it works! I'm assuming Quinoa is not compatible toquarkus-resteasy
.After that, packaging and building for docker worked completly fine and I can now properly display the svelte site…