# DockerComposeEnvironmentResource

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

Represents a Docker Compose environment resource that can host application resources.

## Definition

```typescript
interface DockerComposeEnvironmentResource
  extends IComputeEnvironmentResource,
    IResource {
  dashboardEnabled: boolean;
  defaultNetworkName: string;
  configureComposeFile(configure: (obj: ComposeFile) => Promise<void>): DockerComposeEnvironmentResource;
  configureDashboard(configure: (obj: DockerComposeAspireDashboardResource) => Promise<void>): DockerComposeEnvironmentResource;
  configureEnvFile(configure: (obj: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.CapturedEnvironmentVariable>) => Promise<void>): DockerComposeEnvironmentResource;
  getHostAddressExpression(endpointReference: EndpointReference): ReferenceExpression;
  withDashboard(enabled?: boolean): DockerComposeEnvironmentResource;
  withProperties(configure: (obj: DockerComposeEnvironmentResource) => Promise<void>): DockerComposeEnvironmentResource;
}
```

## Properties

- `dashboardEnabled`: `boolean` `get - set` -- Determines whether to include an Aspire dashboard for telemetry visualization in this environment.
- `defaultNetworkName`: `string` `get - set` -- The name of an existing network to be used.

## Methods

- [configureComposeFile](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/configurecomposefile.md) -- `method` -- Configures the Docker Compose file for the environment resource.
    ```typescript
  configureComposeFile(configure: (obj: ComposeFile) => Promise<void>): DockerComposeEnvironmentResource
  ```
- [configureDashboard](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/configuredashboard.md) -- `method` -- Configures the dashboard properties for this Docker Compose environment.
    ```typescript
  configureDashboard(configure: (obj: DockerComposeAspireDashboardResource) => Promise<void>): DockerComposeEnvironmentResource
  ```
- [configureEnvFile](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/configureenvfile.md) -- `method` -- Configures the captured environment variables for the Docker Compose environment before they are written to the .env file.
    ```typescript
  configureEnvFile(configure: (obj: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.CapturedEnvironmentVariable>) => Promise<void>): DockerComposeEnvironmentResource
  ```
- [getHostAddressExpression](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/gethostaddressexpression.md) -- `method` -- Invokes the GetHostAddressExpression method
    ```typescript
  getHostAddressExpression(endpointReference: EndpointReference): ReferenceExpression
  ```
- [withDashboard](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/withdashboard.md) -- `method` -- Enables the Aspire dashboard for telemetry visualization in this Docker Compose environment.
    ```typescript
  withDashboard(enabled?: boolean): DockerComposeEnvironmentResource
  ```
- [withProperties](/reference/api/typescript/aspire.hosting.docker/dockercomposeenvironmentresource/withproperties.md) -- `method` -- Allows setting the properties of a Docker Compose environment resource.
    ```typescript
  withProperties(configure: (obj: DockerComposeEnvironmentResource) => Promise<void>): DockerComposeEnvironmentResource
  ```
