# withDataBindMount

- Module: [Aspire.Hosting.Valkey](/reference/api/typescript/aspire.hosting.valkey.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Adds a bind mount for the data folder to a Valkey container resource and enables Valkey persistence.

## Definition

```typescript
interface ValkeyResource {
  // ... omitted for brevity
  withDataBindMount(
    source: string,
    isReadOnly?: boolean): ValkeyResource
}
```

## Parameters

- `source` (`string`)
- `isReadOnly` (`boolean`) `optional` `= False`

## Returns

[ValkeyResource](/reference/api/typescript/aspire.hosting.valkey/valkeyresource.md) `builder`

## Applies to

- [ValkeyResource](/reference/api/typescript/aspire.hosting.valkey/valkeyresource.md)
