Detection
Your application is detected as Scala when one of these markers is present in the root directory:build.sbtbuild.scproject/directory
Version Detection
The versions are determined from the following sources:- Scala version -
scalaVersionsetting inbuild.sbt - sbt version -
sbt.versionproperty inproject/build.properties - Java version -
java.runtime.versionin asystem.propertiesfile at the root of your repository
Build Process
During the build, the following steps are performed:- Build environment - The official sbt/Scala build image is used for compilation.
- sbt build - Your application is compiled and packaged using sbt.
- Framework detection - Play Framework and sbt-native-packager are auto-detected. If present, the appropriate packaging commands are used.
- Artifact packaging - The build produces a runnable artifact (JAR or native package).
Run Command
The run command is auto-detected based on your build configuration and any detected frameworks. You can override the run command by defining aweb process in a Procfile at the root of your repository. You can also override the run command directly in the Miget dashboard when creating your app or changing the deployment source.

Configuration
You can customize the build and runtime behavior through the Miget dashboard and repository configuration files:- Environment variables - Set under Settings -> Variables in the Miget dashboard
- JAVA_OPTS - Pass JVM flags such as memory settings (e.g.,
-Xmx512m) - Procfile - Define the start command at the root of your repository
- Project Path - For monorepo setups, specify the subdirectory containing your application code in the Advanced tab
- Pre-Deploy Command - Run a command before deployment (e.g., database migrations) in the Advanced tab
- Post-Deploy Command - Run a command after successful deployment (e.g., seeding data, cache warming) in the Advanced tab
Docker Hardened Images
You can enable Docker Hardened Images (DHI) in the Advanced tab when creating your app or changing the deployment source. When enabled, your application is built using distroless runtime images with a minimal attack surface, no shell, and no package manager.
For the complete reference, see the migetpacks Scala documentation.

