Deployment

This section covers the deployment of the Jmix applications. We will review only basics of the deployment that will let you to start quickly.

For further details, you’ll need to refer to the Spring Boot documentation, all references will be provided further in the text.

All console commands are relative to the application source root.

Jmix Application Deploy Configuration

The typical Jmix deplyment configuration contains of the following components:

  • The application itself

  • A relational database

  • Reverse Proxy (optional)

The application can be deployed and run as

  • Fat Jar

  • Docker Image

In fact, the docker image contains the same fat jar inside. You may prefer using image over deploying pure fat jar if you have an experience with containerization, and your infrastructure supports image deploy by providing right services for it.

Creating Executable Jar

In Jmix studio, open the Gradle tool window (usually it is located on the right side of the IDE) and select Tasks → build → bootJar task.

gradle tool window bootJar
In the command line, use the following command:
$ gradlew bootJar

You can find the executable jar file in the /build/libs folder.

If you want to customize the packaging process or create a deployable .war file, please refer to the Spring Boot Documentation.

Creating Docker Image

In Jmix studio, open the Gradle tool window (usually it is located on the right side of the IDE) and select Tasks → build → bootBuildImage task.

gradle tool window buildImage
In the command line, use the following command:
$ gradlew bootBuildImage

By default, the image will be uploaded to the image repository using the name which is equal to your project’s name and tag equals to you project’s version.

For example, if you specified the following in your settings.gradle:

rootProject.name = 'jmix-sample-planner'

and in your build.gradle:

group = 'com.company'
version = '0.0.1-SNAPSHOT'

then your image will be uploaded as

jmix-sample-planner:0.0.1-SNAPSHOT

You can find more information on image generation and customization in the Spring Boot Documentation