ComposeFile
Handle
interface ComposeFile { configs: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Config>; extensions: Dict<string,any>; name: string; networks: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Network>; secrets: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Secret>; services: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Service>; version: string; volumes: Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ServiceNodes.Volume>; addConfig(name: string, file?: string, content?: string, external?: boolean, configure?: (obj: Config) => Promise<void>): ComposeFile; addNetwork(name: string, driver?: string, external?: boolean, configure?: (obj: Network) => Promise<void>): ComposeFile; addSecret(name: string, file?: string, external?: boolean, configure?: (obj: Secret) => Promise<void>): ComposeFile; addService(name: string, image?: string, configure?: (obj: Service) => Promise<void>): ComposeFile; addVolume(name: string, driver?: string, external?: boolean, configure?: (obj: Volume) => Promise<void>): ComposeFile;} 21 members
Properties
property
configs Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Config> get · set Represents a collection of configuration objects within a Docker Compose file. Each key in the dictionary corresponds to a configuration name, and the value is an instance of the `Config` class that contains the associated configuration details.
property
extensions Dict<string,any> get · set Represents a collection of user-defined extension fields that can be added to the Compose file. These extensions are represented as a dictionary where the key is a string identifier for the extension, and the value is an object that holds the custom data relevant to the extension. This allows flexibility for including additional metadata or configuration outside the scope of standard Compose file specifications.
property
name string get · set Represents the name of the Docker Compose file or project.
property
networks Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Network> get · set Represents the collection of networks defined in a Docker Compose file.
property
secrets Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Secret> get · set Represents the secrets section in a Docker Compose file. Contains a collection of secret definitions used within the Compose file.
property
services Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ComposeNodes.Service> get · set Represents a collection of services defined in a Docker Compose file. Each service is identified by a unique name and contains configuration details as defined by the `Service` class.
property
version string get · set Represents the version of the Docker Compose file format being used. This property specifies the format of the Compose file and determines the supported features and behaviors.
property
volumes Dict<string,Aspire.Hosting.Docker/Aspire.Hosting.Docker.Resources.ServiceNodes.Volume> get · set Represents a collection of volume definitions within a Docker Compose file.
Methods
method
addConfig Adds a top-level config definition to the Docker Compose file.
addConfig(name: string, file?: string, content?: string, external?: boolean, configure?: (obj: Config) => Promise<void>): ComposeFileParameters
name string file string optional content string optional external boolean optional configure (obj: Config) => Promise<void> optional Returns
ComposeFile method
addNetwork Adds a top-level network definition to the Docker Compose file.
addNetwork(name: string, driver?: string, external?: boolean, configure?: (obj: Network) => Promise<void>): ComposeFileParameters
name string driver string optional external boolean optional configure (obj: Network) => Promise<void> optional Returns
ComposeFile method
addSecret Adds a top-level secret definition to the Docker Compose file.
addSecret(name: string, file?: string, external?: boolean, configure?: (obj: Secret) => Promise<void>): ComposeFileParameters
name string file string optional external boolean optional configure (obj: Secret) => Promise<void> optional Returns
ComposeFile method
addService Adds a service definition to the Docker Compose file.
addService(name: string, image?: string, configure?: (obj: Service) => Promise<void>): ComposeFileParameters
name string image string optional configure (obj: Service) => Promise<void> optional Returns
ComposeFile method
addVolume Adds a top-level volume definition to the Docker Compose file.
addVolume(name: string, driver?: string, external?: boolean, configure?: (obj: Volume) => Promise<void>): ComposeFileParameters
name string driver string optional external boolean optional configure (obj: Volume) => Promise<void> optional Returns
ComposeFile