Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ComposeFile.AddConfig

Method
📦 Aspire.Hosting.Docker v17.0.0
type ComposeFile interface {
// ... omitted for brevity
AddConfig(
name string,
options ...*AddConfigOptions,
) ComposeFile
}

Signature

methodAddConfig
Adds a top-level config definition to the Docker Compose file.
AddConfig(
name string,
options ...*AddConfigOptions,
) ComposeFile
namestringThe name of the config.
options...*AddConfigOptionsOptional settings, described under Options.

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

File*stringThe path to the config file.
Content*stringThe inline config content.
External*boolA value indicating whether the config is managed outside the generated Compose file.
Configurefunc(obj Config)callbackAn optional callback for further config customization.
ComposeFile

The updated Docker Compose file.

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

Defined on

This method is defined on the following type: