withDataBindMount

Method
📦 Aspire.Hosting.Redis v17.0.0
interface RedisResource {
// ... omitted for brevity
withDataBindMount(
source: string,
isReadOnly?: boolean): RedisResource;
}

Signature

methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a Redis container resource and enables Redis persistence.
withDataBindMount(
source: string,
isReadOnly?: boolean): RedisResource
sourcestringThe source directory on the host to mount into the container.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only mount. Setting this to `true` will disable Redis persistence. Defaults to `false`.
RedisResource

Applies to

This method applies to the following types: