# PostgresServerResource.withDataBindMount

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/typescript/aspire.hosting.postgresql.md)
- Defined on: [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md)
- Version: `13.4.0`
- Kind: `method`

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;
}
```

## Signature

```typescript
withDataBindMount(
    source: string,
    isReadOnly?: boolean): PostgresServerResource
```

## Parameters

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

## Returns

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

## Defined on

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