Use consistent asciidoctor subs attribute
Closes gh-25101
This commit is contained in:
@@ -15,7 +15,7 @@ A standard-format jar file that contains one or more zip64-format nested jars ca
|
||||
|
||||
To create a '`fully executable`' jar with Maven, use the following plugin configuration:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -28,7 +28,7 @@ To create a '`fully executable`' jar with Maven, use the following plugin config
|
||||
|
||||
The following example shows the equivalent Gradle configuration:
|
||||
|
||||
[source,gradle,indent=0,subs="verbatim,quotes,attributes"]
|
||||
[source,gradle,indent=0,subs="verbatim"]
|
||||
----
|
||||
bootJar {
|
||||
launchScript()
|
||||
@@ -66,7 +66,7 @@ The script supports the following features:
|
||||
|
||||
Assuming that you have a Spring Boot application installed in `/var/myapp`, to install a Spring Boot application as an `init.d` service, create a symlink, as follows:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ sudo ln -s /var/myapp/myapp.jar /etc/init.d/myapp
|
||||
----
|
||||
@@ -74,7 +74,7 @@ Assuming that you have a Spring Boot application installed in `/var/myapp`, to i
|
||||
Once installed, you can start and stop the service in the usual way.
|
||||
For example, on a Debian-based system, you could start it with the following command:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ service myapp start
|
||||
----
|
||||
@@ -84,7 +84,7 @@ TIP: If your application fails to start, check the log file written to `/var/log
|
||||
You can also flag the application to start automatically by using your standard operating system tools.
|
||||
For example, on Debian, you could use the following command:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ update-rc.d myapp defaults <priority>
|
||||
----
|
||||
@@ -101,7 +101,7 @@ When the environment variable is not set, the user who owns the jar file is used
|
||||
You should never run a Spring Boot application as `root`, so `RUN_AS_USER` should never be root and your application's jar file should never be owned by root.
|
||||
Instead, create a specific user to run your application and set the `RUN_AS_USER` environment variable or use `chown` to make it the owner of the jar file, as shown in the following example:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ chown bootapp:bootapp your-app.jar
|
||||
----
|
||||
@@ -114,7 +114,7 @@ For example, you can set the account's shell to `/usr/sbin/nologin`.
|
||||
You should also take steps to prevent the modification of your application's jar file.
|
||||
Firstly, configure its permissions so that it cannot be written and can only be read or executed by its owner, as shown in the following example:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ chmod 500 your-app.jar
|
||||
----
|
||||
@@ -123,7 +123,7 @@ Second, you should also take steps to limit the damage if your application or th
|
||||
If an attacker does gain access, they could make the jar file writable and change its contents.
|
||||
One way to protect against this is to make it immutable by using `chattr`, as shown in the following example:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ sudo chattr +i your-app.jar
|
||||
----
|
||||
@@ -134,7 +134,7 @@ If root is used to control the application's service and you <<deployment#deploy
|
||||
It should be secured accordingly.
|
||||
Use `chmod` so that the file can only be read by the owner and use `chown` to make root the owner, as shown in the following example:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ chmod 400 your-app.conf
|
||||
$ sudo chown root:root your-app.conf
|
||||
@@ -174,7 +174,7 @@ Consult the https://www.freedesktop.org/software/systemd/man/systemd.service.htm
|
||||
|
||||
To flag the application to start automatically on system boot, use the following command:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ systemctl enable myapp.service
|
||||
----
|
||||
@@ -370,7 +370,7 @@ The file is expected to be next to the jar file and have the same name but suffi
|
||||
For example, a jar named `/var/myapp/myapp.jar` uses the configuration file named `/var/myapp/myapp.conf`, as shown in the following example:
|
||||
|
||||
.myapp.conf
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
JAVA_OPTS=-Xmx1024M
|
||||
LOG_FOLDER=/custom/log/folder
|
||||
|
||||
Reference in New Issue
Block a user