Creates a new and optimized server image.

Usage:

kc.bat build [OPTIONS]

Creates a new and optimized server image based on the configuration options
passed to this command. Once created, the configuration will be persisted and
read during startup without having to pass them over again.

Consider running this command before running the server in production for an
optimal runtime.

Options:

-h, --help           This help message.
--help-all           This same help message but with additional options.

Cache:

--cache <type>       Defines the cache mechanism for high-availability. By default, a 'ispn' cache
                       is used to create a cluster between multiple server nodes. A 'local' cache
                       disables clustering and is intended for development and testing purposes.
                       Default: ispn.
--cache-config-file <file>
                     Defines the file from which cache configuration should be loaded from. The
                       configuration file is relative to the 'conf/' directory.
--cache-stack <stack>
                     Define the default stack to use for cluster communication and node discovery.
                       This option only takes effect if 'cache' is set to 'ispn'. Default: udp.

Database:

--db <vendor>        The database vendor. Possible values are: dev-file, dev-mem, mariadb, mssql,
                       mysql, oracle, postgres. Default: dev-file.

Transaction:

--transaction-xa-enabled <true|false>
                     If set to false, Keycloak uses a non-XA datasource in case the database does
                       not support XA transactions. Default: true.

Feature:

--features <feature> Enables a set of one or more features.
--features-disabled <feature>
                     Disables a set of one or more features.

HTTP/TLS:

--http-relative-path <path>
                     Set the path relative to '/' for serving resources. Default: /.

Health:

--health-enabled <true|false>
                     If the server should expose health check endpoints. If enabled, health checks
                       are available at the '/health', '/health/ready' and '/health/live'
                       endpoints. Default: false.

Metrics:

--metrics-enabled <true|false>
                     If the server should expose metrics. If enabled, metrics are available at the
                       '/metrics' endpoint. Default: false.

Vault:

--vault <provider>   Enables a vault provider.

Examples:

  Change the database vendor:

      $ kc.bat build --db=postgres

  Enable a feature:

      $ kc.bat build --features=<feature_name>

  Or alternatively, enable all tech preview features:

      $ kc.bat build --features=preview

  Enable health endpoints:

      $ kc.bat build --health-enabled=true

  Enable metrics endpoints:

      $ kc.bat build --metrics-enabled=true

  Change the relative path:

      $ kc.bat build --http-relative-path=/auth
