Skip to content

Commit f08c560

Browse files
committed
Merge branch '301-memory-heuristics-example'
2 parents c5cb809 + da9d7b9 commit f08c560

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,33 @@ The buildpack supports extension through the use of Git repository forking. The
2626
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, referred to as `flow style` in the yaml spec ([Wikipedia] has a good description of this yaml syntax). For example, to change the default version of Java to 7 and adjust the memory heuristics apply this environment variable to the application.
2727

2828
```bash
29-
$ cf set-env my-application JBP_CONFIG_OPEN_JDK_JRE '{jre: { version: 1.7.0_+ }}'
29+
$ cf set-env my-application JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 1.7.0_+ }, memory_calculator: { memory_heuristics: { heap: 85, stack: 10 } } }'
3030
```
3131

3232
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.
3333

3434
```bash
35-
$ cf set-env my-application JBP_CONFIG_REPOSITORY '{default_repository_root: "http://repo.example.io"}'
35+
$ cf set-env my-application JBP_CONFIG_REPOSITORY '{ default_repository_root: "http://repo.example.io" }'
3636
```
3737

3838
If the key or value contains an environment variable that you want to bind at runtime you need to escape it from your shell. For example, to add command line arguments containing an environment variable to a [Java Main](docs/container-java_main.md) application.
3939

4040
```bash
41-
$ cf set-env my-application JBP_CONFIG_JAVA_MAIN '{arguments: "-server.port=\$PORT -foo=bar"}'
41+
$ cf set-env my-application JBP_CONFIG_JAVA_MAIN '{ arguments: "-server.port=\$PORT -foo=bar" }'
4242
```
4343

4444
Environment variable can also be specified in the applications `manifest` file. For example, to specify an environment variable in an applications manifest file that disables Auto-reconfiguration.
4545

4646
```bash
4747
env:
48-
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
48+
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{ enabled: false }'
4949
```
5050

5151
This final example shows how to change the version of Tomcat that is used by the buildpack with an environment variable specified in the applications manifest file.
5252

5353
```bash
5454
env:
55-
JBP_CONFIG_TOMCAT: '{tomcat: { version: 8.0.+ }}'
55+
JBP_CONFIG_TOMCAT: '{ tomcat: { version: 8.0.+ } }'
5656
```
5757

5858
See the [Environment Variables][] documentation for more information.

0 commit comments

Comments
 (0)