How to configure payara micro the right way?

Hi,

AFAIK, The Payara Micro provides at least two ways to achieve this.

Firstly, the Payara Micro Command Line Options provides the option --domainconfig <file-path> which we are able to point to our customized domain.xml.

Secondly, it provides the --prebootcommandfile <file-path> and --postbootcommandfile <file-path> which executes in the same manner of the asadmin command of the Payara Full as stating at Running asadmin commands using Preboot and Postboot Scripts, together with supporting the variable, e.g. defined at system properties, OS environment variable and so on as Types of variable references and Using variable references. (We may refer to my reply in this forum at Micro Payara configuration in effect for reference.)

Furthermore, if we are not sure about the proper commands to put to our preboot and postboot scripts, The Payara full also provides the Asadmin Recorder to record the actions we take in the admin console as asadmin commands to the log file so that we are able to copy those customizing acitivities within the admin console to the preboot and/or postboot easily.

Please note that most of asadmin command are supported by Payara Micro, but not all. We should consult the documentation case by case.