Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

DockerComposeEnvironmentResource

Handle
📦 Aspire.Hosting.Docker v17.0.0

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

type DockerComposeEnvironmentResource interface {
ComputeEnvironmentResource
Resource
}

Properties

propertyDashboardEnabledboolget · set
Determines whether to include an Aspire dashboard for telemetry visualization in this environment.
DashboardEnabled() (bool, error)
SetDashboardEnabled(value bool) DockerComposeEnvironmentResource
propertyDefaultNetworkName*stringget · set
The name of an existing network to be used.
DefaultNetworkName() (*string, error)
SetDefaultNetworkName(value *string) DockerComposeEnvironmentResource
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)

Methods

Configures the Docker Compose file for the environment resource.
ConfigureComposeFile(configure func(obj ComposeFile)) DockerComposeEnvironmentResource
configurefunc(obj ComposeFile)callbackA method that can be used for customizing the ComposeFile.
DockerComposeEnvironmentResource

The resource builder.

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

methodConfigureDashboardbuilder
Configures the dashboard properties for this Docker Compose environment.
ConfigureDashboard(configure func(obj DockerComposeAspireDashboardResource)) DockerComposeEnvironmentResource
configurefunc(obj DockerComposeAspireDashboardResource)callbackA method that can be used for customizing the dashboard service.
DockerComposeEnvironmentResource

The resource builder.

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

methodConfigureEnvFilebuilder
Configures the captured environment variables for the Docker Compose environment before they are written to the .env file.
ConfigureEnvFile(configure func(obj *Dict[string, CapturedEnvironmentVariable])) DockerComposeEnvironmentResource
configurefunc(obj *Dict[string, CapturedEnvironmentVariable])callbackA method that can be used for customizing the captured environment variables.
DockerComposeEnvironmentResource

The resource builder.

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

Invokes the GetHostAddressExpression method
GetHostAddressExpression(endpointReference EndpointReference) *ReferenceExpression
endpointReferenceEndpointReference
*ReferenceExpression

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

methodWithDashboardbuilder
Enables the Aspire dashboard for telemetry visualization in this Docker Compose environment.
WithDashboard(options ...*WithDashboardOptions) DockerComposeEnvironmentResource
options...*WithDashboardOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDashboardOptions argument.

Enabled*boolWhether to enable the dashboard. Default is true.
DockerComposeEnvironmentResource

The resource builder.

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

methodWithPropertiesbuilder
Allows setting the properties of a Docker Compose environment resource.
WithProperties(configure func(obj DockerComposeEnvironmentResource)) DockerComposeEnvironmentResource
configurefunc(obj DockerComposeEnvironmentResource)callbackA method that can be used for customizing the DockerComposeEnvironmentResource.
DockerComposeEnvironmentResource

The resource builder.

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