You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change updates the Tomcat container to allow a user to configure
the context path that an application is exposed at. Previously, the
application was always exposed at the root ('/') but this didn't work
for many applications that had hard-coded context-path assumptions. In
addition, changes to the Cloud Foundry router mean that applications
can now be routed via both a host and a context path.
[#101289516]
@@ -29,11 +29,15 @@ The buildpack supports extension through the use of Git repository forking. The
29
29
30
30
Buildpack configuration can be overridden with an environment variable matching the configuration file you wish to override minus the `.yml` extension and with a prefix of `JBP_CONFIG`. It is not possible to add new configuration properties and properties with `nil` or empty values will be ignored by the buildpack. The value of the variable should be valid inline yaml. For example, to change the default version of Java to 7 and adjust the memory heuristics apply this environment variable to the application.
If the key or value contains a special character such as `:` it should be escaped with double quotes. For example, to change the default repository path for the buildpack.
Environment variable can also be specified in the applications `manifest` file. See the [Environment Variables][] documentation for more information.
39
43
@@ -92,8 +96,8 @@ The buildpack can be packaged up so that it can be uploaded to Cloud Foundry usi
92
96
The online package is a version of the buildpack that is as minimal as possible and is configured to connect to the network for all dependencies. This package is about 50K in size. To create the online package, run:
93
97
94
98
```bash
95
-
bundle install
96
-
bundle exec rake package
99
+
$ bundle install
100
+
$ bundle exec rake package
97
101
...
98
102
Creating build/java-buildpack-cfd6b17.zip
99
103
```
@@ -104,8 +108,8 @@ The offline package is a version of the buildpack designed to run without access
104
108
To pin the version of dependencies used by the buildpack to the ones currently resolvable use the `PINNED=true` argument. This will update the [`config/` directory][] to contain exact version of each dependency instead of version ranges.
Keeping track of different versions of the buildpack can be difficult. To help with this, the rake `package` task puts a version discriminator in the name of the created package file. The default value for this discriminator is the current Git hash (e.g. `cfd6b17`). To change the version when creating a package, use the `VERSION=<VERSION>` argument:
Copy file name to clipboardExpand all lines: docs/container-tomcat.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The Tomcat Container allows servlet 2 and 3 web applications to be run. These a
12
12
</table>
13
13
Tags are printed to standard output by the buildpack detect script
14
14
15
-
If the application uses Spring, [Spring profiles][] can be specified by setting the [`SPRING_PROFILES_ACTIVE`][] environment variable. This is automatically detected and used by Spring. The Spring Auto-reconfiguration Framework will specify the `cloud` profile in addition to any others.
15
+
If the application uses Spring, [Spring profiles][] can be specified by setting the [`SPRING_PROFILES_ACTIVE`][] environment variable. This is automatically detected and used by Spring. The Spring Auto-reconfiguration Framework will specify the `cloud` profile in addition to any others.
16
16
17
17
## Configuration
18
18
For general information on configuring the buildpack, refer to [Configuration and Extension][].
@@ -45,9 +45,24 @@ The container can be configured by modifying the [`config/tomcat.yml`][] file in
45
45
| `redis_store.repository_root` | The URL of the Redis Store repository index ([details][repositories]).
46
46
| `redis_store.timeout` | The Redis connection timeout (in milliseconds).
47
47
| `redis_store.version` | The version of Redis Store to use. Candidate versions can be found in [this listing](http://download.pivotal.io.s3.amazonaws.com/redis-store/index.yml).
48
+
| `tomcat.context_path` | The context path to expose the application at.
48
49
| `tomcat.repository_root` | The URL of the Tomcat repository index ([details][repositories]).
49
50
| `tomcat.version` | The version of Tomcat to use. Candidate versions can be found in [this listing](http://download.pivotal.io.s3.amazonaws.com/tomcat/index.yml).
50
51
52
+
### Common configurations
53
+
The version of Tomcat can be configured by setting an environment variable.
The container can also be configured by overlaying a set of resources on the default distribution. To do this, add files to the `resources/tomcat` directory in the buildpack fork. For example, to override the default `logging.properties` add your custom file to `resources/tomcat/conf/logging.properties`.
0 commit comments