Modifying Swarm configuration
The fractions available in Swarm come with reasonable defaults. In the examples that we have seen so far, we didn't touch any configuration and yet we were able to see the applications working. Now, we will show you how you can tune the configuration of Swarm-created services.
Swarm provides a set of tools that allows you to modify the configuration of your applications. In the following section, we will introduce them one by one and show their usage in different scenarios. Let's start with the simplest one: system properties.
System properties
You are able to modify the configuration by specifying system properties. Let's return to our catalog-service
. As you saw in the catalog-service
examples from the last chapter, the JAX-RS application was listening for HTTP requests on port 8080, which is the default configuration. Let's suppose that we want to change that port.
What we have to do is specify the swarm.http.port
property during the application execution, as...