Table of Contents
Start Server without UI
Motivation
I want to run the server part of the MapTool for my campaign on a cloud server, where the apps are running in Docker containers.
To have this as easy to maintain as possible there have to be some small, useful enhancements to be done.
Goals
Clear separation between MapTool system and usage data
An update of a current MapTool instance means:
- Save your personal changes
- Install the update
- Change at least the MapTool.cfg file to update the data folder location (and other startup parameters in the cfg-file).
To be clear. Mixing data for system, developers and users is never a good idea. There are reasons, why system relevant data is normally read only.
Of course, some parameters have to be in this file, because they are setting VM parameters, not changeable later. On some (now) rare circumstances even a user have to 'experiment' with them. But setting the language or the data folder location are not such parameters.
So we need a startup.properties file in the MAPTOOL_DATADIR/config directory of MapTool with the user specific startup properties. During Startup, the different locations, where the properties can be defined will have a clear hierarchy (high to low):
- Command line options
- Startup properties
- System properties (configured in the MapTool.cfg file or by passing java JVM options like -D during startup of the JVM
- Default Values
Option on startup to start a server
A restart of the application can be implemented e.g. with docker parameters for the container or with an controller script on the OS. To start the server inside the application you need currently a person or a special robot software to simulate the user actions. A startup parameter to start the server during the initialization of the application would make this much easier.
Refactor: UI startup frame
The options have of course to be added to the startup frame. Because the current description on the right side is not very helpful for people with problems, this is a good moment to rearrange the view and give a user at least concrete hints to find the correct parameter in the MapTool.cfg file.
State
Developing - Finished: Clear separation between MapTool system and usage data
Developing - Finished: Option on startup to start a server
Developing - Started: UI startup frame