From bee7d24c1ad4c39c284b473099387fcf91546b95 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 5 Oct 2015 14:14:51 +0100 Subject: [PATCH] Provide an example of using a .conf file with a truly executable jar Closes gh-3522 --- .../src/main/asciidoc/deployment.adoc | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/deployment.adoc b/spring-boot-docs/src/main/asciidoc/deployment.adoc index 97f4dcb22c..064f22ed1c 100644 --- a/spring-boot-docs/src/main/asciidoc/deployment.adoc +++ b/spring-boot-docs/src/main/asciidoc/deployment.adoc @@ -451,9 +451,23 @@ the default behavior in a script or on the command line: in the script. |=== -TIP: With the exception of `JARFILE` and `APP_NAME`, the above settings can be placed in -a `.conf` next to the jar. For example the jar `/var/myapp/myapp.jar` would attempt to -source the configuration file `/var/myapp/myapp.conf`. + + +[[deployment-script-customization-conf-file]] +==== Customizing the startup script with a conf file + +With the exception of `JARFILE` and `APP_NAME`, the above settings can be configured using +a `.conf` file, + +[indent=0,subs="verbatim,quotes,attributes"] +---- + JAVA_OPTS=-Xmx1024M + LOG_FOLDER=/custom/log/folder +---- + +The file should be situated next to the jar file and have the same name but suffixed with +`.conf` rather than `.jar`. For example, a jar named `/var/myapp/myapp.jar` will use the +configuration file named `/var/myapp/myapp.conf` if it exists.