Serve Mode
One of the Runner’s available modes isserve mode.
The runner can be started in serve mode by setting the WMC_DEFAULT_MODE environment variable to serve,
or switched to this mode using the Runner’s switch endpoint.
This mode starts a local playback session that will continue to serve your configured services
until the runner is stopped or its mode is switched.
Serve Configuration
The serve session started by the Runner can be configured via the same mechanism as therun command
of the WireMock CLI - either via a values file or via environment variables.
Just like the WireMock CLI, by default the Runner will expect a WireMock environment file in the .wiremock directory
in the current working directory of the container.
Starting the Runner In Serve Mode
When starting the runner inserve mode you will need to publish the appropriate ports
for the services you are running along with the port you have configured for the Runner.
Here is a typical example on Linux or macOS when running the Runner on port 9999 and serving two services: