Interface ElasticsearchCommonBuildTimeConfig.ElasticsearchDevServicesBuildTimeConfig
- Enclosing interface:
ElasticsearchCommonBuildTimeConfig
public static interface ElasticsearchCommonBuildTimeConfig.ElasticsearchDevServicesBuildTimeConfig
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum -
Method Summary
Modifier and TypeMethodDescriptionEnvironment variables that are passed to the container.The Elasticsearch distribution to use.enabled()Whether this Dev Service should start with the application in dev mode or tests.The Elasticsearch container image to use.javaOpts()The value for the ES_JAVA_OPTS env variable.port()Optional fixed port the dev service will listen to.booleanreuse()Whether to keep Dev Service containers running *after a dev mode session or test suite execution* to reuse them in the next dev mode session or test suite execution.The value of thequarkus-dev-service-elasticsearchlabel attached to the started container.booleanshared()Whether the Elasticsearch server managed by Quarkus Dev Services is shared.
-
Method Details
-
enabled
Whether this Dev Service should start with the application in dev mode or tests. Dev Services are enabled by default unless connection configuration (e.g. `quarkus.elasticsearch.hosts`) is set explicitly. -
port
Optional fixed port the dev service will listen to.If not defined, the port will be chosen randomly.
-
distribution
Optional<ElasticsearchCommonBuildTimeConfig.ElasticsearchDevServicesBuildTimeConfig.Distribution> distribution()The Elasticsearch distribution to use. Defaults to a distribution inferred from the explicitly configured `image-name` (if any), or by default to the distribution configured in depending extensions (e.g. Hibernate Search), or by default to `elastic`. -
imageName
The Elasticsearch container image to use. Defaults depend on the configured `distribution`: * For the `elastic` distribution: `{elasticsearch-image}` * For the `opensearch` distribution: `{opensearch-image}` -
javaOpts
The value for the ES_JAVA_OPTS env variable. -
serviceName
The value of thequarkus-dev-service-elasticsearchlabel attached to the started container.This property is used when
sharedis set totrue. In this case, before starting a container, Dev Services for Elasticsearch looks for a container with thequarkus-dev-service-elasticsearchlabel set to the configured value. If found, it will use this container instead of starting a new one. Otherwise it starts a new container with thequarkus-dev-service-elasticsearchlabel set to the specified value.This property is used when you need multiple shared Elasticsearch servers.
-
containerEnv
Environment variables that are passed to the container. -
reuse
@WithDefault("true") boolean reuse()Whether to keep Dev Service containers running *after a dev mode session or test suite execution* to reuse them in the next dev mode session or test suite execution. Within a dev mode session or test suite execution, Quarkus will always reuse Dev Services as long as their configuration (username, password, environment, port bindings, ...) did not change. This feature is specifically about keeping containers running **when Quarkus is not running** to reuse them across runs. WARNING: This feature needs to be enabled explicitly in `testcontainers.properties`, may require changes to how you configure data initialization in dev mode and tests, and may leave containers running indefinitely, forcing you to stop and remove them manually. See xref:elasticsearch-dev-services.adoc#reuse[this section of the documentation] for more information. This configuration property is set to `true` by default, so it is mostly useful to *disable* reuse, if you enabled it in `testcontainers.properties` but only want to use it for some of your Quarkus applications.
-