# WithDataBindMount

- Module: [CommunityToolkit.Aspire.Hosting.LavinMQ](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: [`LavinMQContainerResource`](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource.md)
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Configures a bind mount for the LavinMQ container resource to allow data persistence. The method mounts a specified source path on the host to the container's data directory.

## Definition

```go
func (LavinMQContainerResource) WithDataBindMount(
    source string,
    options ...*WithDataBindMountOptions,
) LavinMQContainerResource
```

## Parameters

- `source` (`string`) -- The source path on the host machine to bind mount to the container's data directory.
- `options` (`...*WithDataBindMountOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithDataBindMountOptions` argument.

- `IsReadOnly` (`*bool`) -- Indicates if the bind mount should be configured as read-only. Default is false.

## Returns

[`LavinMQContainerResource`](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource.md) -- An updated resource builder for the LavinMQ container resource with the configured data bind mount.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`LavinMQContainerResource`](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource.md)
