The Cloud Foundry Tomcat Buildpack is a Cloud Native Buildpack V3 that provides Apache Tomcat to applications that are WAR files.
This buildpack is designed to work in collaboration with other buildpacks.
The buildpack will participate if all of the following conditions are met
- The application is a Java application
- The application has a
WEB-INF/
directory
The buildpack will do the following:
- Contribute a Tomcat home
- Contribute a Tomcat base with the following:
context.xml
from the buildpack rootlogging.properties
from the buildpack rootserver.xml
from the buildpack rootweb.xml
from the buildpack root- Access Logging Support activated via environment variables
- Lifecycle Support
- Logging Support
- External Configuration if configured in either
buildpack.toml
or via environment variables - The application to
webapps/ROOT
unless otherwise configured
Environment Variable | Description |
---|---|
$BP_TOMCAT_CONTEXT_PATH |
The context path to mount the application at. Defaults to empty (ROOT ). |
$BP_TOMCAT_EXT_CONF_SHA256 |
The SHA256 hash of the external configuration package |
$BP_TOMCAT_EXT_CONF_STRIP |
The number of directory levels to strip from the external configuration package. Defaults to 0 . |
$BP_TOMCAT_EXT_CONF_URI |
The download URI of the external configuration package |
$BP_TOMCAT_EXT_CONF_VERSION |
The version of the external configuration package |
$BP_TOMCAT_VERSION |
Semver value of the version of Tomcat to use. Defaults to 9.* . |
BPL_TOMCAT_ACCESS_LOGGING |
Whether access logging should be activated. Defaults to inactive. |
The artifacts that the repository provides must be in TAR format and must follow the Tomcat archive structure:
tomcat
└── conf
├── context.xml
├── server.xml
├── web.xml
├── ...
- Requires
jvm-application
This buildpack is released under version 2.0 of the Apache License.