Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

addService

Method
📦 Aspire.Hosting.Docker v13.6.0
interface ComposeFile {
// ... omitted for brevity
addService(
name: string,
image?: string,
configure?: callback): ComposeFile;
}

Signature

methodaddService
Adds a service definition to the Docker Compose file.
addService(name: string, image?: string, configure?: (obj: Service) => Promise<void>): ComposeFile
namestring
imagestringoptional
configure(obj: Service) => Promise<void>optional
ComposeFile

Applies to

This method applies to the following types: