Tuning up a Docker installation
Configuring Upsource Launcher properties
Upsource Launcher process uses:
Upsource-specific properties — can be changed programmatically with the
configure
command.For a list of configurable Upsource-specific Launcher properties, see Upsource-specific properties
JVM properties — can be changed programmatically with the
configure
command or by manually editing the configuration file upsource.jvmoptions.A JVM property can be also changed on a temporary basis, passing it as an ad hoc parameter with the regular
run
command. This method only applies the changes for the current run and does not change the configuration file. Use this option when you want to test changes to your server configuration.For a list of the default JVM options for the Upsource Launcher process, see Launcher default JVM options.
To change Upsource-specific Launcher properties:
Stop Upsource:
docker exec <containerId> stop
Enter the regular
run
command, followed by theconfigure
command and all of the settings that you want to update in the configuration file. You can set multiple options in a single command. For example:docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ configure --listen-port 1111 --base-url http://upsource.mydomain.com:2222
To change JVM Launcher properties programmatically:
Stop Upsource:
docker exec <containerId> stop
Enter the regular
run
commandSpecify the entry point
Type in the
configure
command followed by all of the settings that you want to update in the configuration file.Add an option with the
-
symbol.Remove an option with the
+
symbol.Upsource starts with the specified settings.
The configuration file upsource.jvmoptions is modified and the new settings will be applied to any consequent startup.
Use the -J
prefix followed by a JVM option. Do not add any spaces between the prefix and the option.
The symbol that precedes the option determines how it is applied:
If you specify a value, the corresponding option is only removed if it has exactly the same value.
You can set multiple options in a single command.
Example:
In this example we increased the allocated JVM heap size from 600MB (default) to 800MB.
You can also change JVM setting by editing a configuration file manually.
To change JVM Launcher properties manually:
Stop Upsource:
docker exec <containerId> stop
Open the configuration file upsource.jvmoptions located in <path to conf directory>/conf/.
If the the file does not exist, create it and copy the contents of the sample configuration file with the .dist extension into it.
Edit the JVM options directly in the file. Add new JVM options to the end of the file, listing each option on a new line. To set a pre-defined JVM option, simply uncomment the corresponding line.
Save and close the file.
Start Upsource:
docker start <containerId>
.The changes to the configuration file are copied to the database.
Upsource starts with the specified settings.
To change JVM Launcher properties on a temporary basis (ad hoc):
Stop Upsource:
docker exec <containerId> stop
Enter the regular
run
command, followed by all of the settings that you want to pass to Upsource on start.Example:
docker run -it -v <path to data directory>:/opt/upsource/data \ -v <path to conf directory>:/opt/upsource/conf \ -v <path to logs directory>:/opt/upsource/logs \ -v <path to backups directory>:/opt/upsource/backups \ -p <port on host>:8080 \ jetbrains/upsource:<version> \ --J-Xmx1024m --J-XX:+HeapDumpOnOutOfMemoryErrorUse the
--J
prefix followed by a JVM option. Do not add any spaces between the prefix and the option.The symbol that precedes the option determines how it is applied:
Add an option with the
-
symbol.Remove an option with the
+
symbol.
If you specify a value, the corresponding option is only removed if it has exactly the same value.
You can set multiple options in a single command.
Upsource starts with the specified settings, bypassing the configuration file.
The configuration file is not modified.
Subsequent starts that do not specify the ad hoc parameter use the settings that are stored in the configuration file. To run Upsource with the previous settings, simply restart it without passing any custom parameters.
Configuring Upsource Frontend properties
Upsource Frontend process uses:
Upsource Frontend properties can be changed programmatically with the configure
command or by manually editing the configuration file upsource-frontend.jvmoptions
To configure Frontend properties programmatically:
Stop Upsource:
docker exec <containerId> stop
Enter the regular
run
commandSpecify the entry point
Type in the
configure
command followed by all of the settings that you want to update in the configuration file.Add an option with the
-
symbol.Remove an option with the
+
symbol.Upsource starts with the specified settings.
The configuration file
upsource-frontend.jvmoptions
is modified and the new settings will be applied to any consequent startup.
Use the -J
prefix followed by a property or JVM option. Do not add any spaces between the prefix and the property.
The symbol that precedes the option determines how it is applied:
If you specify a value, the corresponding option is only removed if it has exactly the same value.
You can set multiple options in a single command.
Example:
In this example we increased the maximum number of lines to display in a diff from 1000(default) to 2000.
To configure Frontend properties manually:
Stop Upsource:
docker exec <containerId> stop
Open the configuration file upsource-frontend.jvmoptions. The file is located in the
<path to conf directory>/conf/upsource-frontend/
. If the file does not exist, create it.Edit existing properties directly in the file. Add new properties with their values to the end of the file.
Save and close the file.
Start Upsource:
docker start <containerId>
.The changes to the configuration file are copied to the database.
Upsource starts with the specified settings.
Configuring Upsource Cassandra properties
You can manage the Cassandra process by changing its JVM options with theconfigure
command or by manually editing the configuration file cassandra.jvmoptions. See Upsource Cassandra properties for a list of the default options. To configure Cassandra properties programmatically:
Stop Upsource:
docker exec <containerId> stop
Enter the regular
run
commandSpecify the entry point
Type in the
configure
command followed by all of the settings that you want to update in the configuration file.Add an option with the
-
symbol.Remove an option with the
+
symbol.Upsource starts with the specified settings.
The configuration file cassandra.jvmoptions is modified and the new settings will be applied to any consequent startup.
Use the -J
prefix followed by a JVM option. Do not add any spaces between the prefix and the option.
The symbol that precedes the option determines how it is applied:
If you specify a value, the corresponding option is only removed if it has exactly the same value.
You can set multiple options in a single command.
Example:
To configure Cassandra properties manually:
Stop Upsource:
docker exec <containerId> stop
Open the configuration file cassandra.jvmoptions located in the
<path to conf directory>/conf/cassandra/
.If the the file does not exist, create it and copy the contents of the sample configuration file with the .dist extension into it.
Edit the JVM options directly in the file. Add new JVM options to the end of the file, listing each option on a new line. To set a pre-defined JVM option, simply uncomment the corresponding line.
Save and close the file.
Start Upsource:
docker start <containerId>
.The changes you made to the configuration file are copied to the database.
Upsource starts with the specified settings.