ComposeFile.addSecret

Method
📦 Aspire.Hosting.Docker v17.0.0
interface ComposeFile {
// ... omitted for brevity
addSecret(name: string, file?: string, external?: boolean, configure?: (obj: Secret) => Promise<void>): ComposeFile;
}

Signature

methodaddSecret
Adds a top-level secret definition to the Docker Compose file.
addSecret(name: string, file?: string, external?: boolean, configure?: (obj: Secret) => Promise<void>): ComposeFile
namestringThe name of the secret.
filestringoptionalThe path to the secret file.
externalbooleanoptionalA value indicating whether the secret is managed outside the generated Compose file.
configure(obj: Secret) => Promise<void>optionalAn optional callback for further secret customization.
ComposeFile

Defined on

This method is defined on the following type: