addSecret
Method
interface ComposeFile { // ... omitted for brevity addSecret( name: string, file?: string, external?: boolean, configure?: callback): ComposeFile;}Signature
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
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.Returns
ComposeFile Applies to
This method applies to the following types: