addService
Method
interface ComposeFile { // ... omitted for brevity addService( name: string, image?: string, configure?: callback): ComposeFile;}Signature
method
addService Adds a service definition to the Docker Compose file.
addService(name: string, image?: string, configure?: (obj: Service) => Promise<void>): ComposeFileParameters
namestringThe name of the service.imagestringoptionalThe container image to use for the service.configure(obj: Service) => Promise<void> optionalAn optional callback for further service customization.Returns
ComposeFile Applies to
This method applies to the following types: