Skip to main content
Version: Previous

Genesis containerisation - configuration

Configuration options

Docker plugin extension

To customise how the Docker plugin behaves, the Genesis low-code platform provides a Gradle plugin extension.

The table below describes the values that can be changed:

NameDescriptionDefault
compactProcessesWhen set to true, combines compatible services into a single process, which reduces the number of services running within the containerfalse
debugEnvVarsAllows you to provide a map of the environment variables that will be passed to the containers created by the extra tasks enabled with debugMode
This has no effect, unless debugMode is set to true
null
debugModeWhen set to true, this changes the Dockerfile to create an image that has extra tools in it to help debugging.
Extra yum packages include: vim, net-tools
false
networkNameWhen using the extra debug tasks, this setting allows you to specify a custom Docker network for the containers to use.
This has no effect unless debugMode is set to true
null
useGenesisContainerLogConfigDefines whether the container should use a specific log4j configuration file that is designed for our containers.
When set to true, logs are effectively output by the container PID1, allowing most container orchestration systems to capture all the logs with default settings.
true
preCompileScriptsWhen set to true, the build process must include a step that compiles all the .kts scripts and caches the results.
This results in a slower build process, but dramatically decreases the start-up time of the container.
true

These settings should be set in the server/jvm/appname-deploy/build.gradle.kts file:

dockerImage {
compactProcesses.set(true)
debugMode.set(true)
debugEnvVars.putAll(
mapOf(
"DB_HOST" to "172.17.0.2"
)
)
}

Local plugin configuration

The Genesis low-code platform also supports overrides of the Docker extension configuration, allowing for different values for different environments. This means that you can set your own values without changing any files that are tracked in SCM.

This is done by adding server/jvm/appname-deploy/gradle.properties and ensuring that the file is ignored by SCM.

Extension ConfigGradle Properties EquivalentNotes
compactProcessesdockerCompactProcessesN/A
debugEnvVarsdockerDebugEnvVarsThis should be a comma-separated list.
e.g DB_HOST=genesis_db,DB_PORT=5432
debugModedockerDebugModeN/A
networkNamedockerNetworkNameN/A
useGenesisContainerLogConfigdockerUseGenesisContainerLogConfigN/A
preCompileScriptsdockerPreCompileScriptsN/A

Environment variables

Below is a list of environment variables that can be passed to the Docker container at runtime.

VariableDescriptionDefault
GENESIS_DB_DRY_RUNAllows you to see the output of a remap without committing it.
This option only has an effect if it’s used with GENESIS_DB_INSTALL or GENESIS_DB_UPGRADE
false
GENESIS_DB_INSTALLRuns a remap and then a genesisInstallHooks --init to mark the migration hooks so they do not run again.
This should only be used during the initial DB setup, as it will ignore the migration hooks.
GENESIS_DB_UPGRADE should be used for any further DB schema changes.
The container will exit on completion and will not run any Genesis processes.
false
GENESIS_DB_UPGRADERuns genesisInstallHooks to run any migration hooks, then runs a remap
The container will exit on completion and will not run any Genesis processes
false

You can also set System Definitions values from environment variables, which allows you to change the location of external dependencies (such as the database) between your production and non-production environments.