# withDataBindMount

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

Adds a bind mount for the data folder to a PostgreSQL container resource.

## Definition

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

## Parameters

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

## Returns

[PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md) `builder`

## Applies to

- [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md)
