You can run a web application or Liberty server package in the Liberty Container.
Detection Criterion | Existence of a server.xml or WEB-INF/ folder in the application directory |
Tags | liberty-⟨version⟩ |
To specify the Spring profiles, set the SPRING_PROFILES_ACTIVE
environment variable. This is automatically detected and used by Spring.
The Liberty container can be configured by modifying the config/liberty.yml
file in the buildpack fork or by passing an environment variable that overrides configuration in the yml file. The container uses the Repository
utility support and it supports the version syntax.
Name | Description |
---|---|
repository_root |
The URL of the Liberty repository index (details). |
version |
The version of the Liberty profile. You can find the candidate versions here. |
minify |
Boolean indicating whether the Liberty server should be minified. The default value is false . |
liberty_repository_properties |
Liberty repository configuration. |
default_config |
Default configuration for WAR and EAR files. |
Minification potentially reduces the size of the deployed Liberty server because only the requested features are included. This might result in longer push times.
The minify
option can be overridden on a per-application basis by specifying a minify
environment variable in the manifest.yml
for the application. For example:
env:
minify: true
By default, the Buildpack will download the Liberty features specified in the server.xml
from Liberty repository. To disable this feature, set the useRepository
option to false
.
liberty_repository_properties:
useRepository: true
The buildpack provides a default server.xml
configuration when deploying WAR or EAR files. The configuration contains a list of Liberty features that are enabled by default. This set of features can be adjusted by modifying the features
setting.
default_config:
features:
- jsf-2.0
- jsp-2.2
- servlet-3.0
- ejbLite-3.1
- cdi-1.0
- jpa-2.0
- jdbc-4.0
- jndi-1.0
- managedBeans-1.0
- jaxrs-1.1