This document describes the behaviour and environment configuration when running your Gradle apps on AusNimbus.
Table of Contents
- Runtime Environments
- Web Process
- Dependency Management
- Debug Mode
AusNimbus supports the latest stable Java release.
The currently supported versions are
The most recent version of Gradle will be used unless a Gradle wrapper is found.
To use the Gradle wrapper you need to include the
gradlew file in the root of your repository. It is highly recommended you use
Your application's web processes must bind to port
AusNimbus handles SSL termination at the load balancer.
gradle build is used to build your application. The builder will attempt to detect the task required based on your application.
You are able to pass your own parameters using the following environment variable:
|GRADLE_BUILD_TASK||Parameters passed to
AusNimbus builders are split into two stages:
Both stages are completely extensible, allowing you to customize or completely overwrite each stage.
Build Stage (assemble)
If you want to customize the build stage, you need to add the executable
.s2i/bin/assemble file in your repository.
This file should contain the logic required to build and install any dependencies your application requires.
If you only want to extend the build stage, you may use this example:
#!/bin/bash echo "Logic to include before" # Run the default builder logic . /usr/libexec/s2i/assemble echo "Logic to include after"
Runtime Stage (run)
If you only want to change the executed command for the run stage you may the following environment variable.
|APP_RUN||Define a custom command to start your application.|
APP_RUN will overwrite any builder's runtime configuration (including the Debug Mode section)
Alternatively you may customize or overwrite the entire runtime stage by including the executable file
This file should contain the logic required to execute your application.
If you only want to extend the run stage, you may use this example:
#!/bin/bash echo "Logic to include before" # Run the default builder logic . /usr/libexec/s2i/run
As the run script executes every time your application is deployed, scaled or restarted it's recommended to keep avoid including complex logic which may delay the start-up process of your application.
Persistent Environment Variables
The recommend approach is to set your environment variables in the AusNimbus dashboard.
However it is possible to store environment variables in code using the
The file expects a key=value format eg.
The AusNimbus builder provides a convenient environment variable to help you debug your application.
|DEBUG||Set to "TRUE" to enable Debug Mode|
Web processes must bind to port
8080 and only the HTTP protocol is permitted for incoming connections.